summaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
AgeCommit message (Collapse)Author
2011-07-27CodeGen: rename CodeGenModule::Runtime to ObjCRuntimePeter Collingbourne
llvm-svn: 136254
2011-07-27Add support for C++0x unicode string and character literals, from Craig Topper!Douglas Gregor
llvm-svn: 136210
2011-07-25Rename getInstantiationLineNumber to getExpansionLineNumber in bothChandler Carruth
SourceManager and FullSourceLoc. llvm-svn: 135969
2011-07-23fix PR10415, tidying up IR representation of module level inline asmChris Lattner
to avoid extraneous \n's. llvm-svn: 135862
2011-07-23Move ArrayRef to LLVM.h and eliminate now-redundant qualifiers, patch by Jon ↵Chris Lattner
Mulder! llvm-svn: 135855
2011-07-23remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner
LLVM.h imports them into the clang namespace. llvm-svn: 135852
2011-07-22Add a const overload for ObjCInterfaceDecl::all_declared_ivar_begin.Jordy Rose
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 Foad
ConstantExpr::getInBoundsGetElementPtr to use ArrayRef. llvm-svn: 135673
2011-07-18In C99, emit an inline function when encountering an extern redeclaration.Nick Lewycky
Fixes PR10233! llvm-svn: 135377
2011-07-18de-constify llvm::Type, patch by David Blaikie!Chris Lattner
llvm-svn: 135370
2011-07-15Convert CallInst and InvokeInst APIs to use ArrayRef.Jay Foad
llvm-svn: 135265
2011-07-14Change intrinsic getter to take an ArrayRef, now that the underlying ↵Benjamin Kramer
function in LLVM does. llvm-svn: 135155
2011-07-12Second attempt at de-constifying LLVM Types in FunctionType::get(),Jay Foad
StructType::get() and TargetData::getIntPtrType(). llvm-svn: 134982
2011-07-12Revert r134888 (and related patches in other trees). It was causingBill Wendling
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 Foad
llvm-svn: 134888
2011-07-09clang side to match the LLVM IR type system rewrite patch.Chris Lattner
llvm-svn: 134831
2011-07-07r134634 causes a failure on MultiSource/Benchmarks/Olden/bh with TEST=nightly,Cameron Zwarich
so roll it out. llvm-svn: 134638
2011-07-07A redeclaration of an inline method in C99 mode should trigger emission of thatNick Lewycky
function. Fixes PR10233! llvm-svn: 134634
2011-06-24Change the IR-generation of VLAs so that we capture bounds,John McCall
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 Dunbar
llvm-svn: 133530
2011-06-20llvm-gcc treats a tentative definition with a previousFariborz Jahanian
(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 Lattner
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 Lattner
llvm-svn: 133365
2011-06-16Move computation of __private_extern__ visibilty toFariborz Jahanian
getLVForNamespaceScopeDecl(). // rdar://9609649 llvm-svn: 133182
2011-06-16Set the visibility to 'hidden' when previousFariborz Jahanian
declaration of global var is __private_extern__. // rdar://9609649 llvm-svn: 133157
2011-06-15Automatic Reference Counting.John McCall
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 Friedman
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 Gregor
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 Friedman
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 Espindola
llvm-svn: 132034
2011-05-17Code cleanup of my last patch.Fariborz Jahanian
llvm-svn: 131499
2011-05-17Patch to fix IR-gen crash generating structure ABI which implementsFariborz Jahanian
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 McCall
types. Also, cache a translation of 'void' in CGM and provide a ptrdiff_t alias. No functionality change. llvm-svn: 131373
2011-05-13SimplifyJoerg Sonnenberger
llvm-svn: 131321
2011-05-13Bug 8765: Honor assembler labels for builtins. Ensure that the label isJoerg Sonnenberger
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 Jahanian
-fno-constant-cfstrings. Patch by Jonathan Schleifer. llvm-svn: 131298
2011-05-13When determining whether we can make a declaration into a globalDouglas Gregor
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 Gregor
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 Hunt
- 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 Friedman
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 Smith
llvm-svn: 130953
2011-05-05Preserve the full name of the file, so that '-c -o foo.pic.o' producesNick Lewycky
foo.pic.gcno instead of foo.gcno. llvm-svn: 130899
2011-05-04Record where the GCOV data files should be placed.Nick Lewycky
llvm-svn: 130866
2011-04-22Add -fdelayed-template-parsing option. Using this option all templated ↵Francois Pichet
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 Lewycky
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 Foad
llvm-svn: 129929
2011-04-19ADT/Triple: Switch to using .isOSDarwin() predicate.Daniel Dunbar
llvm-svn: 129823
2011-04-12IRgen/Obj-C: Emit CFStrings and NSStrings with the alignment of the char type,Daniel Dunbar
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 McCall
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 McCall
llvm-svn: 129337