- Jan 14, 2013
-
-
David Greene authored
Use const_cast<> to avoid cast-away-const errors. llvm-svn: 172464
-
Andrew Trick authored
Note that this bug is only exposed because LTO fails to use TTI. Fixes self-LTO of clang. rdar://13007381. llvm-svn: 172462
-
Howard Hinnant authored
llvm-svn: 172461
-
Nick Lewycky authored
llvm-svn: 172460
-
Douglas Gregor authored
module-import dependencies, so we'll get the link order correct for those silly linkers that need it. llvm-svn: 172459
-
-
Argyrios Kyrtzidis authored
initial size and an allocator. llvm-svn: 172455
-
Joe Groff authored
llvm-svn: 172454
-
Joe Groff authored
Use the existing move implementation of the internal DenseMap::InsertIntoBucket method to provide a user-facing move insert method. llvm-svn: 172453
-
Michael Gottesman authored
llvm-svn: 172452
-
Eli Bendersky authored
Now that it behaves itself in terms of streamer independence (r172450), this method can be moved to MCAsmParser to be available to all extensions, overriding, etc. -- -This line, and those below, will be ignored-- M lib/MC/MCParser/AsmParser.cpp M include/llvm/MC/MCParser/MCAsmParser.h llvm-svn: 172451
-
Eli Bendersky authored
The aim of this patch is to fix the following piece of code in the platform-independent AsmParser: void AsmParser::CheckForValidSection() { if (!ParsingInlineAsm && !getStreamer().getCurrentSection()) { TokError("expected section directive before assembly directive"); Out.SwitchSection(Ctx.getMachOSection( "__TEXT", "__text", MCSectionMachO::S_ATTR_PURE_INSTRUCTIONS, 0, SectionKind::getText())); } } This was added for the "-n" option of llvm-mc. The proposed fix adds another virtual method to MCStreamer, called InitToTextSection. Conceptually, it's similar to the existing InitSections which initializes all common sections and switches to text. The new method is implemented by each platform streamer in a way that it sees fit. So AsmParser can now do this: void AsmParser::CheckForValidSection() { if (!ParsingInlineAsm && !getStreamer().getCurrentSection()) { TokError("expected section directive before assembly directive"); Out.InitToTextSection(); } } Which is much more reasonable. llvm-svn: 172450
-
Eli Bendersky authored
Since it's used by extensions. One further step to fully decoupling GenericAsmParser from an intimate knowledge of the internals of AsmParser, pointing it to the MCASmParser interface instead (like all other parser extensions do). Since this change moves the MacroArgument type to the interface header, it's renamed to be a bit more descriptive in a general context. llvm-svn: 172449
-
Douglas Gregor authored
link options for the modules it imports. llvm-svn: 172448
-
Howard Hinnant authored
Fix string conversions functions to throw out_of_range properly. Fixes http://llvm.org/bugs/show_bug.cgi?id=14919. llvm-svn: 172447
-
Jordan Rose authored
This should fix cast-away-const warnings reported by David Greene. llvm-svn: 172446
-
Jordan Rose authored
Patch by David Greene, modified by me. llvm-svn: 172445
-
Jordan Rose authored
This was previously added to support -[NSAutoreleasePool drain], which behaves like -release under non-GC and "please collect" under GC. We're not currently modeling the autorelease pool stack, though, so we can just take this out entirely. Fixes PR14927. llvm-svn: 172444
-
Jim Ingham authored
llvm-svn: 172442
-
Douglas Gregor authored
!0 = metadata !{metadata !"-lautolink"} !1 = metadata !{metadata !"-framework", metadata !"autolink_framework"} referenced from llvm.module.linkoptions, e.g., !llvm.module.linkoptions = !{!0, !1, !2, !3} This conceptually moves the logic for figuring out the syntax the linker will accept from LLVM into Clang. Moreover, it makes it easier to support MSVC's #pragma comment(linker, "some option") in the future, should anyone care to do so. llvm-svn: 172441
-
Eli Bendersky authored
The methods are also exposed via the MCAsmParser interface, which allows more than one client to control them. Previously, GenericAsmParser was playing with a member var in AsmParser directly (by virtue of being its friend). llvm-svn: 172440
-
Douglas Gregor authored
will have a shared library with the same name as its framework (and no suffix!) within its .framework directory. Detect this both when inferring the whole top-level framework and when parsing a module map. llvm-svn: 172439
-
Bill Schmidt authored
the 64-bit PowerPC ELF ABI. The ABI requires that the real and imaginary parts of a complex argument each occupy their own doubleword. Arguments smaller than 8 bytes are right-adjusted within the doubleword. Clang expects EmitVAARG() to return a pointer to a structure in which the real and imaginary parts are packed adjacently in memory. To accomplish this, we generate code to load the code appropriately from the varargs location and pack the values into a temporary variable in the form Clang expects, returning a pointer to that structure. The test case demonstrates correct code generation for all "small" complex types on PPC64: int, short, char, and float. llvm-svn: 172438
-
Douglas Gregor authored
metadata for linking against the libraries/frameworks for imported modules. The module map language is extended with a new "link" directive that specifies what library or framework to link against when a module is imported, e.g., link "clangAST" or link framework "MyFramework" Importing the corresponding module (or any of its submodules) will eventually link against the named library/framework. For now, I've added some placeholder global metadata that encodes the imported libraries/frameworks, so that we can test that this information gets through to the IR. The format of the data is still under discussion. llvm-svn: 172437
-
Howard Hinnant authored
Michael van der Westhuizen: Improve support for testing on Linux. Fixes http://llvm.org/bugs/show_bug.cgi?id=14892. llvm-svn: 172436
-
-
Alexander Kornienko authored
llvm-svn: 172434
-
Manuel Klimek authored
We now format this correctly: Status::Rep Status::global_reps[3] = { { kGlobalRef, OK_CODE, NULL, NULL, NULL }, { kGlobalRef, CANCELLED_CODE, NULL, NULL, NULL }, { kGlobalRef, UNKNOWN_CODE, NULL, NULL, NULL } }; - fixed a bug where BreakBeforeClosingBrace would be set on the wrong state - added penalties for breaking between = and {, and between { and any other non-{ token llvm-svn: 172433
-
Daniel Jasper authored
llvm-svn: 172432
-
Daniel Jasper authored
Now, "if (a) return;" is only allowed, if this option is set. Also add a Chromium style which is currently identical to Google style except for this option. llvm-svn: 172431
-
Will Dietz authored
Specify weaker memory order in case we optimize for it in the future, presently still doing same __sync_lock_test_and_set() as before. Change suggested by Alexey Samsonov, thanks! llvm-svn: 172429
-
Daniel Jasper authored
If the first line of a merge would exactly fit into the column limit, an unsigned overflow made us not break. llvm-svn: 172426
-
Daniel Jasper authored
Before: #include "a.h" #include "b.h" After: #include "a.h" #include "b.h" llvm-svn: 172424
-
Daniel Jasper authored
Before: #define A \ A After: #define A A llvm-svn: 172423
-
Evgeniy Stepanov authored
Move my_rand() to the common header. This lets us avoid the use of rand_r in sanitizer_common tests. There is no rand_r on Android. llvm-svn: 172421
-
Benjamin Kramer authored
llvm-svn: 172420
-
Alexey Samsonov authored
llvm-svn: 172419
-
Dmitry Vyukov authored
llvm-svn: 172415
-
Edwin Vane authored
Reviewers: klimek llvm-svn: 172414
-
Daniel Jasper authored
Before: if (a) return; After: if (a) return; Not yet sure, whether this is always desired, but we can add options and make this a style parameter as we go along. llvm-svn: 172413
-