Chris Lattner
3637652ab3
random code cleanups.
...
llvm-svn: 67437
2009-03-21 07:12:05 +00:00
Chris Lattner
6098e62d56
remove obviously dead code: you can't bitcast a pointer to "Ty" (a function type).
...
llvm-svn: 67436
2009-03-21 06:58:21 +00:00
Chris Lattner
9e8120e067
avoid making constant folding logic eliminate obviously dead bitcasts, speeding up PR3810
...
by ~2%.
llvm-svn: 67434
2009-03-21 06:53:34 +00:00
Chris Lattner
725a26b818
Add a fast path to CodeGenModule::getMangledName for almost all C functions,
...
speeding up the testcase in PR3810 by 60%.
llvm-svn: 67431
2009-03-21 06:31:09 +00:00
Daniel Dunbar
4e004ed124
IRgen support for alias of global variable.
...
- PR3818.
llvm-svn: 67297
2009-03-19 08:27:24 +00:00
Fariborz Jahanian
3654e65adf
objc: Implemented variables declared in class interface
...
whose sema decl is at the translation unit.
llvm-svn: 67249
2009-03-18 22:33:24 +00:00
Duncan Sands
1918413137
Adjust for linkage name change.
...
llvm-svn: 66691
2009-03-11 20:15:27 +00:00
Duncan Sands
bdf086f7c0
Correct for change of this name in LLVM.
...
llvm-svn: 66652
2009-03-11 08:40:02 +00:00
Daniel Dunbar
99d2835099
Backout r66408, we don't want handling of globals to rely on the
...
module symbol table. The root problem inspiring this was fixed in
r66316 (and again in r66506).
llvm-svn: 66512
2009-03-09 23:53:08 +00:00
Mike Stump
e3193ff452
Be sure to never create two functions with the same name, instead arrange to
...
reuse the prior one.
llvm-svn: 66408
2009-03-09 06:40:26 +00:00
Eli Friedman
4663a3368d
Make constant emission for @encode use the common string emission code.
...
This is a bit cleaner, and also "fixes" bad code that compares the
addresses of the string constants.
llvm-svn: 66346
2009-03-07 20:17:55 +00:00
Mike Stump
a6ca334389
Fixup our uses of various linkages to match how llvm now works. I think they are all
...
correct, but an extra set of ObjC eyes would be good.
llvm-svn: 66342
2009-03-07 16:33:28 +00:00
Daniel Dunbar
7aecee998c
(LLVM svn up) Generalize RuntimeFunctions to RuntimeGlobals and add
...
CodeGenModule::CreateRuntimeVariable.
- No real functionality change; although we now assert on silly
things like:
--
int objc_exception_throw;
void f0() { @throw(@"A"); }
--
instead of accepting it.
llvm-svn: 66292
2009-03-06 22:13:30 +00:00
Daniel Dunbar
8e79b8491f
IRgen support for weak_import.
...
- <rdar://problem/6652110> clang should support weak_import
llvm-svn: 66270
2009-03-06 16:20:49 +00:00
Daniel Dunbar
f804897ee9
Don't mangle names of local variables.
...
- For one thing, this adds unneeded overhead; for another, this
routine can be used to emit unnamed decls which we shouldn't try to
mangle.
llvm-svn: 66212
2009-03-05 22:59:19 +00:00
Eli Friedman
cecc21d2f6
Make IRGen compatible with declaring a function with incomplete
...
return/argument types. (The generated IR isn't ideal, but we can't
really do better in general.)
llvm-svn: 66132
2009-03-05 04:18:07 +00:00
Mike Stump
6c39666a77
Move more of the blocks code up and out.
...
llvm-svn: 66046
2009-03-04 18:47:42 +00:00
Mike Stump
95435674f9
Move more of blocks codegen out of CodeGenModule and into the
...
BlockModule. No functionality change. This should help people that
don't want to know anything about blocks not be confused by the
overloaded use of the term block or nor want to see all the blocks
goop.
llvm-svn: 66042
2009-03-04 18:17:45 +00:00
Daniel Dunbar
5b9e9682f1
Support "asm" renaming of external symbols.
...
- PR3698.
llvm-svn: 66038
2009-03-04 17:31:19 +00:00
Daniel Dunbar
0f3403cb5a
Don't set nounwind on functions when in using the new Obj-C ABI.
...
llvm-svn: 65806
2009-03-02 04:58:03 +00:00
Chris Lattner
a01c21f616
simplify some code.
...
llvm-svn: 65782
2009-03-01 18:47:06 +00:00
Anders Carlsson
655129990a
Initialize NSConcreteStackBlock
...
llvm-svn: 65749
2009-03-01 01:17:11 +00:00
Mike Stump
537abb0dec
Fix PR3612. We ensure that we add builtins to the GlobalDeclMap and
...
we ensure that things added to the module can be found even when they
are not in GlobalDeclMap. The later is for increased flexibility,
should someone want to do something tricky like extern "Ada" in the
same module.
llvm-svn: 65657
2009-02-27 22:42:30 +00:00
Eli Friedman
97e070ed68
Minor cleanup: use getDeclAlignInBytes helper.
...
llvm-svn: 65611
2009-02-27 04:11:37 +00:00
Chris Lattner
d42c29f9a2
fix some sema problems with wide strings and hook up basic codegen for them.
...
llvm-svn: 65582
2009-02-26 23:01:51 +00:00