aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
AgeCommit message (Collapse)AuthorFilesLines
2011-07-25Rename getInstantiationLineNumber to getExpansionLineNumber in bothChandler Carruth1-2/+2
SourceManager and FullSourceLoc. llvm-svn: 135969
2011-07-23fix PR10415, tidying up IR representation of module level inline asmChris Lattner1-0/+2
to avoid extraneous \n's. llvm-svn: 135862
2011-07-23Move ArrayRef to LLVM.h and eliminate now-redundant qualifiers, patch by Jon ↵Chris Lattner1-1/+1
Mulder! llvm-svn: 135855
2011-07-23remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner1-32/+32
LLVM.h imports them into the clang namespace. llvm-svn: 135852
2011-07-22Add a const overload for ObjCInterfaceDecl::all_declared_ivar_begin.Jordy Rose1-3/+2
This was previously not-const only because it has to lazily construct a chain of ivars the first time it is called (and after the chain is invalidated). In practice, all the clients were just const_casting their const Decls; all those now-unnecessary const_casts have been removed. llvm-svn: 135741
2011-07-21Convert ConstantExpr::getGetElementPtr andJay Foad1-4/+4
ConstantExpr::getInBoundsGetElementPtr to use ArrayRef. llvm-svn: 135673
2011-07-18In C99, emit an inline function when encountering an extern redeclaration.Nick Lewycky1-2/+15
Fixes PR10233! llvm-svn: 135377
2011-07-18de-constify llvm::Type, patch by David Blaikie!Chris Lattner1-29/+29
llvm-svn: 135370
2011-07-15Convert CallInst and InvokeInst APIs to use ArrayRef.Jay Foad1-2/+1
llvm-svn: 135265
2011-07-14Change intrinsic getter to take an ArrayRef, now that the underlying ↵Benjamin Kramer1-3/+3
function in LLVM does. llvm-svn: 135155
2011-07-12Second attempt at de-constifying LLVM Types in FunctionType::get(),Jay Foad1-6/+4
StructType::get() and TargetData::getIntPtrType(). llvm-svn: 134982
2011-07-12Revert r134888 (and related patches in other trees). It was causingBill Wendling1-4/+6
an assert on Darwin llvm-gcc builds. Assertion failed: (castIsValid(op, S, Ty) && "Invalid cast!"), function Create, file /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.llvm-gcc-i386-darwin9-RA/llvm.src/lib/VMCore/Instructions.cpp, line 2067. etc. http://smooshlab.apple.com:8013/builders/llvm-gcc-i386-darwin9-RA/builds/2354 --- Reverse-merging r134888 into '.': U lib/CodeGen/CodeGenModule.cpp llvm-svn: 134950
2011-07-11De-constify Types in FunctionType::get().Jay Foad1-6/+4
llvm-svn: 134888
2011-07-09clang side to match the LLVM IR type system rewrite patch.Chris Lattner1-6/+7
llvm-svn: 134831
2011-07-07r134634 causes a failure on MultiSource/Benchmarks/Olden/bh with TEST=nightly,Cameron Zwarich1-15/+2
so roll it out. llvm-svn: 134638
2011-07-07A redeclaration of an inline method in C99 mode should trigger emission of thatNick Lewycky1-2/+15
function. Fixes PR10233! llvm-svn: 134634
2011-06-24Change the IR-generation of VLAs so that we capture bounds,John McCall1-0/+4
not sizes; so that we use well-typed allocas; and so that we properly recurse through the full set of variably-modified types. llvm-svn: 133827
2011-06-21IRgen: Add CGOptions to CGTypes.Daniel Dunbar1-1/+1
llvm-svn: 133530
2011-06-20llvm-gcc treats a tentative definition with a previousFariborz Jahanian1-1/+2
(or follow up) extern declaration with weak_import as an actual definition. make clang follows this behavior. // rdar://9538608 llvm-gcc treats an extern declaration with weak_import llvm-svn: 133450
2011-06-20Update to match mainline ConstantStruct::get API change. Also, use Chris Lattner1-2/+2
ConvertType on InitListExprs as they are being converted. This is needed for a forthcoming patch, and improves the IR generated anyway (see additional type names in testcases). This patch also converts a bunch of std::vector's in CGObjCMac to use C arrays. There are a ton more that should be converted as well. llvm-svn: 133413
2011-06-18update for api change.Chris Lattner1-1/+1
llvm-svn: 133365
2011-06-16Move computation of __private_extern__ visibilty toFariborz Jahanian1-11/+2
getLVForNamespaceScopeDecl(). // rdar://9609649 llvm-svn: 133182
2011-06-16Set the visibility to 'hidden' when previousFariborz Jahanian1-2/+11
declaration of global var is __private_extern__. // rdar://9609649 llvm-svn: 133157
2011-06-15Automatic Reference Counting.John McCall1-4/+17
Language-design credit goes to a lot of people, but I particularly want to single out Blaine Garst and Patrick Beard for their contributions. Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself, in no particular order. llvm-svn: 133103
2011-06-10PR10120: Make CodeGenModule::getVTableLinkage use NamedDecl::getLinkage to ↵Eli Friedman1-1/+1
determine whether the vtable should be externally visible, instead of a rough approximation of it which messes up with templates. While I'm here, zap the other user of isInAnonymousNamespace outside of Decl.cpp. llvm-svn: 132861
2011-06-05When inferring the result type of a block based on a return statementDouglas Gregor1-0/+1
with a type-dependent expression, infer the placeholder type 'Context.DependentTy' to indicate that this is just a placeholder. Fixes PR9982 / <rdar://problem/9486685>. llvm-svn: 132657
2011-05-27Match llvm-gcc's string literals alignment by forcing alignment on string ↵Eli Friedman1-0/+1
literals to 1. This can significantly impact the size of the string data, and as far as I know, the alignment doesn't help performance. rdar://9078969 . llvm-svn: 132223
2011-05-25Update for llvm api change.Rafael Espindola1-0/+3
llvm-svn: 132034
2011-05-17Code cleanup of my last patch.Fariborz Jahanian1-13/+8
llvm-svn: 131499
2011-05-17Patch to fix IR-gen crash generating structure ABI which implementsFariborz Jahanian1-14/+21
user specified string class via -fconstant-string-class option. pr9914. llvm-svn: 131496
2011-05-15Use arrays and SmallVectors instead of std::vectors when building functionJohn McCall1-21/+14
types. Also, cache a translation of 'void' in CGM and provide a ptrdiff_t alias. No functionality change. llvm-svn: 131373
2011-05-13SimplifyJoerg Sonnenberger1-1/+1
llvm-svn: 131321
2011-05-13Bug 8765: Honor assembler labels for builtins. Ensure that the label isJoerg Sonnenberger1-4/+14
mangled to avoid doing it twice for platforms that use prefixes like Darwin. llvm-svn: 131311
2011-05-13Produce UTF-8 strings with -fconstant-string-classFariborz Jahanian1-21/+15
-fno-constant-cfstrings. Patch by Jonathan Schleifer. llvm-svn: 131298
2011-05-13When determining whether we can make a declaration into a globalDouglas Gregor1-1/+3
constant, also consider whether it's a class type that has any mutable fields. If so, it can't be a global constant. llvm-svn: 131276
2011-05-07In C++, allow us to emit a global as 'constant' even if it has classDouglas Gregor1-7/+10
type, so long as it is known to have a constant initializer and the class type is a POD class. Fixes <rdar://problem/9306265>. llvm-svn: 131060
2011-05-06Modify some deleted function methods to better reflect reality:Alexis Hunt1-2/+2
- New isDefined() function checks for deletedness - isThisDeclarationADefinition checks for deletedness - New doesThisDeclarationHaveABody() does what isThisDeclarationADefinition() used to do - The IsDeleted bit is not propagated across redeclarations - isDeleted() now checks the canoncial declaration - New isDeletedAsWritten() does what it says on the tin. - isUserProvided() now correct (thanks Richard!) This fixes the bug that we weren't catching void foo() = delete; void foo() {} as being a redefinition. llvm-svn: 131013
2011-05-06Add an implementation of thunks for varargs methods. The implementation is ↵Eli Friedman1-5/+10
a bit messy, but it is correct as long as the method in question doesn't use indirect gotos. A couple of possible alternative implementations are outlined in FIXME's in this patch. rdar://problem/8077308 . llvm-svn: 130993
2011-05-05Implement support for C++0x alias templates.Richard Smith1-0/+1
llvm-svn: 130953
2011-05-05Preserve the full name of the file, so that '-c -o foo.pic.o' producesNick Lewycky1-6/+6
foo.pic.gcno instead of foo.gcno. llvm-svn: 130899
2011-05-04Record where the GCOV data files should be placed.Nick Lewycky1-0/+20
llvm-svn: 130866
2011-04-22Add -fdelayed-template-parsing option. Using this option all templated ↵Francois Pichet1-2/+6
function definitions are parsed at the end of the translation unit only if it is required by an actual instantiation. As such all the symbols of the TU are available during name lookup. Using this flag is necessary for compatibility with Microsoft template code. This also provides some parsing speed improvement. llvm-svn: 130022
2011-04-21Wire up the -ftest-coverage and -fprofile-arcs flags to .gcno file emission (atNick Lewycky1-3/+6
compile time) and .gcda emission (at runtime). --coverage enables both. This does not yet add the profile_rt library to the link step if -fprofile-arcs is enabled when linking. llvm-svn: 129956
2011-04-21PR9214: Convert Metadata API to use ArrayRef.Jay Foad1-2/+2
llvm-svn: 129929
2011-04-19ADT/Triple: Switch to using .isOSDarwin() predicate.Daniel Dunbar1-1/+1
llvm-svn: 129823
2011-04-12IRgen/Obj-C: Emit CFStrings and NSStrings with the alignment of the char type,Daniel Dunbar1-0/+6
there is no reason to align them higher. - This roughly matches llvm-gcc's r126913. - It is an open question whether or not we should do this for cstring's in general (code size vs optimization potential), for now we just match llvm-gcc until someone wants to run some experiments. llvm-svn: 129410
2011-04-12Template static data members can have weak_odr linkage, not justJohn McCall1-3/+1
weak linkage. Also, fix a problem where global weak variables with non-trivial initializers were getting guard variables, or at least were checking for them and then crashing. llvm-svn: 129342
2011-04-12Ignore indirect field declarations. Fixes PR9570.John McCall1-0/+5
llvm-svn: 129337
2011-04-12After some discussion with Doug, we decided that it made a lot more senseJohn McCall1-48/+0
for __unknown_anytype resolution to destructively modify the AST. So that's what it does now, which significantly simplifies some of the implementation. Normal member calls work pretty cleanly now, and I added support for propagating unknown-ness through &. llvm-svn: 129331
2011-04-09fix indentationChris Lattner1-7/+6
llvm-svn: 129202