- Aug 06, 2008
-
-
Daniel Dunbar authored
having multiple bindings from all the possible decls which conceptually map to the same global). - This eliminates CodeGen depending on the LLVM module for name lookup. - This also eliminates the need for ReplaceMapValuesWith (hurrah). - This handles lookups for FunctionDecls correctly in the presence of aliases, this was previously broken. - WIP: Can still clean up & unify variable and function emission. llvm-svn: 54382
-
- Aug 05, 2008
-
-
Ted Kremenek authored
Refactored driver logic for CodeGen into LLVMCodeGenWriter. This ASTConsumer layers on top of LLVMCodeGen (another existing ASTConsumer) to emit bitcode files to disk. This layering takes this logic out of clang.cpp and puts it directly into the ASTConsumer interface. The benefit is that now --emit-llvm works with both serialized ASTs and regular source files. llvm-svn: 54364
-
- Aug 04, 2008
-
-
Chris Lattner authored
Finally fix PR2189. This makes a fairly invasive but important change to move getAsArrayType into ASTContext instead of being a method on type. This is required because getAsArrayType(const AT), where AT is a typedef for "int[10]" needs to return ArrayType(const int, 10). Fixing this greatly simplifies getArrayDecayedType, which is a good sign. llvm-svn: 54317
-
- Aug 01, 2008
-
-
Daniel Dunbar authored
- There is an miscompilation issue remaining due to a poor interaction between the delayed emission of static functions and the emission of constructors, but that already existed prior to this change. llvm-svn: 54258
-
- Jul 30, 2008
-
-
Daniel Dunbar authored
instead of mapping the decl to a bitcast of the global to the correct type. - GetAddrOf{Function,GlobalVar} introduce the bitcast on every use now. - This solves a problem where a dangling pointer could be introduced by the RAUW done when replacing a forward or tentative definition. See testcase for more details. - Fixes <rdar://problem/6108358> llvm-svn: 54211
-
Daniel Dunbar authored
- No (intended) functionality change. - Primary purpose is to clearly separate (lazy) construction of globals that are a forward declaration or tentative definition from those that are the final definition. - Lazy construction is now encapsulated in GetAddrOf{Function,GlobalVar} while final definitions are constructed in EmitGlobal{Function,Var}Definition. - External interface for dealing with globals is now limited to EmitGlobal and GetAddrOf{Function,GlobalVar}. - Also updated helper functions dealing with statics, annotations, and ctors to be private. llvm-svn: 54179
-
- Jul 29, 2008
-
-
Daniel Dunbar authored
- Killed useless CodeGenModule::EmitGlobalVarDeclarator, instead just recurse on any ScopedDecl. - Fix for <rdar://problem/6093838> llvm-svn: 54162
-
- Jul 21, 2008
-
-
Chris Lattner authored
simplifying code along the way and fixing a problem and memory leak or two. llvm-svn: 53876
-
Chris Lattner authored
various objc lists over to it. First up, the protocol list on ObjCInterfaceDecl. llvm-svn: 53856
-
- Jun 26, 2008
-
-
Chris Lattner authored
we don't push strings into LLVM IR and then have to read them back out. llvm-svn: 52765
-
Chris Lattner authored
llvm-svn: 52764
-
Chris Lattner authored
instead of passing in just a couple random things it currently happens to use. llvm-svn: 52756
-
- Jun 08, 2008
-
-
Nuno Lopes authored
llvm-svn: 52092
-
- Jun 05, 2008
-
-
Sanjiv Gupta authored
llvm-svn: 51993
-
- Jun 04, 2008
-
-
Eli Friedman authored
because trying to access non-existent ParamVarDecls can crash. Testcase from the original source for PR2414. llvm-svn: 51960
-
- Jun 01, 2008
-
-
Eli Friedman authored
much closer to passing the gcc struct layout tests. It might be possible to refactor this a bit, but I'm not sure there's actually enough common code for that to be useful. To get the calling convention completely correct, a bit of platform-specific code is necessary even for x86-Linux. On x86-Linux, the alignment of function parameters is extremely strange; as far as I can tell, it's always 4 except for SSE vectors or structs containing SSE vectors. I'm continuing to investigate this. llvm-svn: 51839
-
Anton Korobeynikov authored
Implemented by David Chisnall! llvm-svn: 51835
-
- May 30, 2008
-
-
Eli Friedman authored
types so that they end up the correct size. llvm-svn: 51787
-
Eli Friedman authored
associated declaration. This is a prerequisite to handling general union initializations; for example, an array of unions involving pointers has to be turned into a struct because the elements can have incompatible types. I refactored the code a bit to make it more readable; now, the logic for definitions is all in EmitGlobalVarInit. The second parameter for GetAddrOfGlobalVar is now dead; I'll remove it separately. By itself, this patch should not cause any visible changes. llvm-svn: 51783
-
Eli Friedman authored
This fixes a crash on the included testcase (found in NetHack). llvm-svn: 51767
-
- May 29, 2008
-
-
Eli Friedman authored
alignment and alignment attributes. llvm-svn: 51676
-
Eli Friedman authored
This change makes clang generate the same thing as llvm-gcc. llvm-svn: 51674
-
- May 27, 2008
-
-
Eli Friedman authored
llvm-svn: 51587
-
Eli Friedman authored
been used. In preparation for the fix to PR2360, but also a minor bug in its own right. llvm-svn: 51583
-
- May 26, 2008
-
-
Eli Friedman authored
required for correctness in cases of copying a struct to itself or to an overlapping struct (itself for cases like *a = *a, and overlapping is possible with unions). Hopefully, this won't end up being a perf issue; LLVM *should* be able to optimize memmove to memcpy in a lot of cases, and for small copies the generated code *should* be mostly comparable. (In reality, LLVM is currently horrible at optimizing memmove, but that's a bug, not a fundamental issue.) gcc currently generates wrong code; that's http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32667. llvm-svn: 51566
-
- May 22, 2008
-
-
Dan Gohman authored
lib/CodeGen/CGExpr.cpp and to change include/clang/AST/Attr.h to use its own enum for visibility types instead of using llvm::GlobalValue::VisibilityTypes. These changes eliminate dependencies in the AST library on LLVM's VMCore library. llvm-svn: 51398
-
- May 20, 2008
-
-
Eli Friedman authored
as far as I can tell, and it fixes code like test/CodeGen/functions.c. (Whatever performance effect it might have, crashing on a construct like this isn't really acceptable; I've run into this multiple times.) llvm-svn: 51312
-
- May 08, 2008
-
-
Sanjiv Gupta authored
Added -g command line options to clang for generating source level debug information. This patch currently enables generation of line number debug information (stoppoints) and region begin/end debug information. The new files CGDebugInfo.h and CGDebugInfo.cpp implements the debug info manager class CGDebugInfo. llvm-svn: 50848
-
- May 04, 2008
-
-
Chris Lattner authored
Fix 'swapping' of attributes to not insert null values into the DeclAttrs map. llvm-svn: 50612
-
Chris Lattner authored
type should be internal, not weak/linkonce. llvm-svn: 50611
-
- Apr 30, 2008
-
-
Chris Lattner authored
llvm-svn: 50485
-
- Apr 25, 2008
-
-
Chris Lattner authored
reimplemented in Sema someday. This is tracked in PR2236. Until then disabling it removes some bogus diagnostics (see 2236). llvm-svn: 50263
-
- Apr 20, 2008
-
-
Nate Begeman authored
Add test Implement feedback from Chris re: PR1998 llvm-svn: 50001
-
Nate Begeman authored
Warn about unused static functions and variables. This fixes PR1998. llvm-svn: 49987
-
- Apr 19, 2008
-
-
Nate Begeman authored
llvm-svn: 49951
-
Nate Begeman authored
llvm-svn: 49944
-
- Apr 16, 2008
-
-
Steve Naroff authored
Remove FileVarDecl and BlockVarDecl. They are replaced by VarDecl::isBlockVarDecl() and VarDecl::isFileVarDecl(). This is a fairly mechanical/large change. As a result, I avoided making any changes/simplifications that weren't directly related. I did break two Analysis tests. I also have a couple FIXME's in UninitializedValues.cpp. Ted, can you take a look? If the bug isn't obvious, I am happy to dig in and fix it (since I broke it). llvm-svn: 49748
-
- Apr 06, 2008
-
-
Gabor Greif authored
llvm-svn: 49279
-
- Mar 31, 2008
-
-
Chris Lattner authored
remaining open issues I've communicated to him: 1) self can be assigned to, and his patch didn't handle it correctly. 2) CollectObjCIvarTypes is N^2 (because each subclass reprocesses all parent class ivars) and flattens classes. If A derives from B, and both have an int, I'd expect to get { {i32}, i32}, not { i32, i32}. David, please review. llvm-svn: 48970
-
Chris Lattner authored
etoile runtime, patch by David Chisnall! llvm-svn: 48969
-