summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic
Commit message (Collapse)AuthorAgeFilesLines
...
* Update CMake dependencies.Ted Kremenek2011-12-171-0/+1
| | | | llvm-svn: 146836
* Add -mavx2 and -mno-avx2 command line support. Also add core-avx2 processor ↵Craig Topper2011-12-171-2/+27
| | | | | | type. llvm-svn: 146835
* Add the value of "suitably aligned" from the C++11 standard to Basic/TargetInfo.Nick Lewycky2011-12-162-1/+8
| | | | | | | | This is equal to alignof(std::max_align_t) on the platform and equal to the alignment provided by malloc. (Platform owners please double-check your platform's value.) llvm-svn: 146762
* Fix 80-column violation and whitespace. No functionality change.Nick Lewycky2011-12-161-2/+3
| | | | llvm-svn: 146761
* C++11 constexpr: Add note stacks containing backtraces if constant evaluationRichard Smith2011-12-161-0/+1
| | | | | | | | | | fails within a call to a constexpr function. Add -fconstexpr-backtrace-limit argument to driver and frontend, to control the maximum number of notes so produced (default 10). Fix APValue printing to be able to pretty-print all APValue types, and move the testing for this functionality from a unittest to a -verify test now that it's visible in clang's output. llvm-svn: 146749
* In SourceManager::~SourceManager do a sanity check to make sure weArgyrios Kyrtzidis2011-12-151-4/+8
| | | | | | | | don't try to destruct a null ContentCache. rdar://10567159 llvm-svn: 146707
* gcov-style profiling support for OpenBSD. Patch by Jonathan Gray.Eli Friedman2011-12-151-1/+20
| | | | llvm-svn: 146631
* Hexagon backend supportTony Linthicum2011-12-121-1/+134
| | | | llvm-svn: 146413
* In ContentCache::replaceBuffer, add sanity check to make sure that we do not ↵Argyrios Kyrtzidis2011-12-101-1/+5
| | | | | | | | free a buffer and then continue using it. rdar://10359140. llvm-svn: 146308
* Add a sanity check in SourceManager::getColumnNumber, make sureArgyrios Kyrtzidis2011-12-101-1/+8
| | | | | | we don't try to access beyond the buffer. llvm-svn: 146305
* Separate the serialization library's diagnostics from the frontend'sChandler Carruth2011-12-091-0/+2
| | | | | | | diagnostics. Conflating them was highly confusing and makes it harder to establish a firm layering separation between these two libraries. llvm-svn: 146207
* Misc Minix-specific changes to clang:Eli Friedman2011-12-081-0/+1
| | | | | | | | | | | . move compiler-rt to a separate directory so the -L argument only includes compiler-rt (thanks joerg) . build all clang subdirs . switches the Minix platform to ELF . normalizes toolchain invocation Patch by Ben Gras. llvm-svn: 146206
* Tweak the syntax of umbrella headers, so that "umbrella" is treated asDouglas Gregor2011-12-081-1/+6
| | | | | | | | | | | a modifier for a header declarartion, e.g., umbrella header "headername" Collapse the umbrella-handling code in the parser into the header-handling code, so we don't duplicate the header-search logic. llvm-svn: 146159
* Within the module representation, generalize the notion of an umbrellaDouglas Gregor2011-12-081-1/+8
| | | | | | | | | | header to also support umbrella directories. The umbrella directory for an umbrella header is the directory in which the umbrella header resides. No functionality change yet, but it's coming. llvm-svn: 146158
* Parse inferred submodules in module maps, track their contents inDouglas Gregor2011-12-051-9/+22
| | | | | | | Module, and (de-)serialize this information. Semantics of inferred submodules to follow. llvm-svn: 145864
* Fix printing of wildcard exports.Douglas Gregor2011-12-051-5/+14
| | | | llvm-svn: 145812
* Implement support for wildcard exports in modules, allowing a moduleDouglas Gregor2011-12-051-0/+12
| | | | | | | | to re-export anything that it imports. This opt-in feature makes a module behave more like a header, because it can be used to re-export the transitive closure of a (sub)module's dependencies. llvm-svn: 145811
* Implement (de-)serialization of the set of exported modules in aDouglas Gregor2011-12-021-0/+25
| | | | | | module map. llvm-svn: 145695
* Add support for AVX registers to clang inline asm. Add a small testcaseEric Christopher2011-12-021-0/+2
| | | | | | | | | and update the Sema testcase with a register that we won't hit for a while I hope. Fixes rdar://10510405 llvm-svn: 145671
* When we're passing a vector with an illegal type through memory on x86-64, ↵Eli Friedman2011-12-021-1/+5
| | | | | | use byval so we're sure the backend does the right thing. Fixes va_arg with illegal vectors and an obscure ABI mismatch with __m64 vectors. llvm-svn: 145652
* Add support for AMD's bulldozer.Benjamin Kramer2011-12-011-0/+26
| | | | llvm-svn: 145606
* Promote ModuleMap::Module to a namespace-scope class in the BasicDouglas Gregor2011-11-302-0/+92
| | | | | | | | | library, since modules cut across all of the libraries. Rename serialization::Module to serialization::ModuleFile to side-step the annoying naming conflict. Prune a bunch of ModuleMap.h includes that are no longer needed (most files only needed the Module type). llvm-svn: 145538
* Fix some possible gcc-4.2 may be used uninitialized warnings.Daniel Dunbar2011-11-281-1/+1
| | | | llvm-svn: 145293
* Make our handling of MMX x SSE closer to what gcc does:Rafael Espindola2011-11-271-11/+34
| | | | | | | | * Enabling sse enables mmx. * Disabling (-mno-mmx) mmx, doesn't disable sse (we got this right already). * The order in not important. -msse -mno-mmx is the same as -mno-mmx -msse. llvm-svn: 145194
* AAPCS compliance - 32-bit wchar_t should be unsigned for both aapcs and ↵James Molloy2011-11-231-0/+5
| | | | | | | | aapcs-linux. Original behaviour of defining wchar_t as signed int has been kept for apcs-gnu as I don't have any spec for this to validate against. llvm-svn: 145102
* Revert r132539 for now, "My testing shows that function stat has no problem ↵NAKAMURA Takumi2011-11-171-0/+6
| | | | | | | | with trailing separators. (tested on Windows and Darwin)." It caused PR10331. MSVCRT stat() cannot strip trailing '/'. (can '\') llvm-svn: 144884
* Implement (de-)serialization of the buffer contents for an overriddenDouglas Gregor2011-11-161-0/+1
| | | | | | | | | | file in the source manager. This allows us to properly create and use modules described by module map files without umbrella headers (or with incompletely umbrella headers). More generally, we can actually build a PCH file that makes use of file -> buffer remappings, which could be useful in libclang in the future. llvm-svn: 144830
* Add a -cc1-level option -fmodule-name=<name>, which will be used whenDouglas Gregor2011-11-151-0/+2
| | | | | | building modules. llvm-svn: 144680
* Warning option typo correction: When two options have the same edit_distance ↵Benjamin Kramer2011-11-151-4/+6
| | | | | | | | don't display either. Also add a maximum edit distance threshold, so we don't correct "-Wx" to "-W#pragma-messages". llvm-svn: 144644
* Print a typo correction hint for unknown warning flags.Benjamin Kramer2011-11-141-0/+21
| | | | | | | $ clang -Wololo t.c warning: unknown warning option '-Wololo'; did you mean '-Wall'? [-Wunknown-warning-option] llvm-svn: 144591
* Define some built-ins macros on mips32 platform, from Simon Atanasyan!Douglas Gregor2011-11-091-0/+4
| | | | llvm-svn: 144189
* [PCH] Fix reading from PCH of diagnostic pragmas.Argyrios Kyrtzidis2011-11-091-10/+1
| | | | | | | | | | | In certain cases ASTReader would call the normal DiagnosticsEngine API to initialize the state of diagnostic pragmas but DiagnosticsEngine would try to compare source locations leading to crash because the main FileID was not yet initialized. Yet another case of the ASTReader trying to use the normal APIs and inadvertently breaking invariants. Fix this by having the ASTReader set up the internal state directly. llvm-svn: 144153
* Use StringRef's case transformation methods.Benjamin Kramer2011-11-061-3/+2
| | | | llvm-svn: 143889
* Move definitions of SizeType and PtrDiffType to Mips32TargetInfoBase.Akira Hatanaka2011-11-051-5/+5
| | | | llvm-svn: 143775
* Fix various minor issues find via unreachable code warnings, fromDouglas Gregor2011-11-021-0/+2
| | | | | | Ahmed Charles! llvm-svn: 143569
* Move ConvertUTF8toUTF32 out of #if 0, in preparation for a patch which needs it.Eli Friedman2011-11-011-61/+62
| | | | llvm-svn: 143415
* In x86_64, when calling an Objective-C method that returns a _Complex long ↵Anders Carlsson2011-10-312-0/+6
| | | | | | double, make sure to use the objc_msgSend_fp2ret function which ensures that the return value will be {0, 0} if the receiver is nil. llvm-svn: 143350
* Add support for sse4a and enable it for amdfam10 cpu.Roman Divacky2011-10-301-3/+9
| | | | llvm-svn: 143312
* Add support for amdfam10 cpu.Roman Divacky2011-10-301-0/+9
| | | | llvm-svn: 143305
* Make the loading of information attached to an IdentifierInfo from anDouglas Gregor2011-10-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AST file more lazy, so that we don't eagerly load that information for all known identifiers each time a new AST file is loaded. The eager reloading made some sense in the context of precompiled headers, since very few identifiers were defined before PCH load time. With modules, however, a huge amount of code can get parsed before we see an @import, so laziness becomes important here. The approach taken to make this information lazy is fairly simple: when we load a new AST file, we mark all of the existing identifiers as being out-of-date. Whenever we want to access information that may come from an AST (e.g., whether the identifier has a macro definition, or what top-level declarations have that name), we check the out-of-date bit and, if it's set, ask the AST reader to update the IdentifierInfo from the AST files. The update is a merge, and we now take care to merge declarations before/after imports with declarations from multiple imports. The results of this optimization are fairly dramatic. On a small application that brings in 14 non-trivial modules, this takes modules from being > 3x slower than a "perfect" PCH file down to 30% slower for a full rebuild. A partial rebuild (where the PCH file or modules can be re-used) is down to 7% slower. Making the PCH file just a little imperfect (e.g., adding two smallish modules used by a bunch of .m files that aren't in the PCH file) tips the scales in favor of the modules approach, with 24% faster partial rebuilds. This is just a first step; the lazy scheme could possibly be improved by adding versioning, so we don't search into modules we already searched. Moreover, we'll need similar lazy schemes for all of the other lookup data structures, such as DeclContexts. llvm-svn: 143100
* Use assert(0) instead of duplicating the check, suggestion by Anna.Argyrios Kyrtzidis2011-10-251-3/+3
| | | | llvm-svn: 142886
* Remove the Blackfin backend.Dan Gohman2011-10-251-79/+0
| | | | llvm-svn: 142881
* Remove the SystemZ backend.Dan Gohman2011-10-241-63/+0
| | | | llvm-svn: 142879
* Make changes necessary for N32/64 ABI conformance.Akira Hatanaka2011-10-221-9/+25
| | | | | | | - Size of long double is 16 bytes for both N32 and N64. - Size of pointers and long is 8 bytes for N64. llvm-svn: 142705
* Further refine the diagnostic categories for ARC diagnostics. Addresses ↵Ted Kremenek2011-10-201-2/+7
| | | | | | <rdar://problem/10245086>. llvm-svn: 142571
* Use llvm::Triple's methods to parse FreeBSD version numbers.Benjamin Kramer2011-10-181-4/+5
| | | | | | | Who could've thought that FreeBSD would ever reach version 10! Patch from Dimitry Andric. llvm-svn: 142349
* For modules, all macros that aren't include guards are implicitlyDouglas Gregor2011-10-171-0/+2
| | | | | | | public. Add a __private_macro__ directive to hide a macro, similar to the __module_private__ declaration specifier. llvm-svn: 142188
* Place static initializers on linux into the ".text.startup" section, so the ↵Benjamin Kramer2011-10-151-0/+4
| | | | | | | | linker can group them together for performance. This only has an effect with fairly new binutils (2.21.51 or later). Other ELF targets probably want this as well, but on BSDs binutils is usually old so it doesn't matter. llvm-svn: 142076
* Provide half floating point support as a storage only type.Anton Korobeynikov2011-10-141-0/+3
| | | | | | Lack of half FP was a regression compared to llvm-gcc. llvm-svn: 142016
* Misc fixes for atomics. Biggest fix is doing alignment correctly for ↵Eli Friedman2011-10-142-0/+19
| | | | | | _Atomic types. llvm-svn: 142002
OpenPOWER on IntegriCloud