Commit Graph

1034 Commits

Author SHA1 Message Date
Craig Topper 865fff5d4c Add -mavx2 and -mno-avx2 command line support. Also add core-avx2 processor type.
llvm-svn: 146835
2011-12-17 19:55:21 +00:00
Nick Lewycky f59e129c3b Add the value of "suitably aligned" from the C++11 standard to Basic/TargetInfo.
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
2011-12-16 22:34:14 +00:00
Nick Lewycky c0a61734df Fix 80-column violation and whitespace. No functionality change.
llvm-svn: 146761
2011-12-16 22:32:39 +00:00
Richard Smith f6f003af6a C++11 constexpr: Add note stacks containing backtraces if constant evaluation
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
2011-12-16 19:06:07 +00:00
Argyrios Kyrtzidis af41b3f0f2 In SourceManager::~SourceManager do a sanity check to make sure we
don't try to destruct a null ContentCache.

rdar://10567159

llvm-svn: 146707
2011-12-15 23:37:55 +00:00
Eli Friedman 3715d1f435 gcov-style profiling support for OpenBSD. Patch by Jonathan Gray.
llvm-svn: 146631
2011-12-15 02:15:56 +00:00
Tony Linthicum 76329bf83f Hexagon backend support
llvm-svn: 146413
2011-12-12 21:14:55 +00:00
Argyrios Kyrtzidis cc6107df08 In ContentCache::replaceBuffer, add sanity check to make sure that we do not free a buffer
and then continue using it. rdar://10359140.

llvm-svn: 146308
2011-12-10 01:38:26 +00:00
Argyrios Kyrtzidis 6c8d29f7d1 Add a sanity check in SourceManager::getColumnNumber, make sure
we don't try to access beyond the buffer.

llvm-svn: 146305
2011-12-10 00:30:38 +00:00
Chandler Carruth 22a11b7248 Separate the serialization library's diagnostics from the frontend's
diagnostics. Conflating them was highly confusing and makes it harder to
establish a firm layering separation between these two libraries.

llvm-svn: 146207
2011-12-09 00:02:23 +00:00
Eli Friedman 83de51301a Misc Minix-specific changes to clang:
. 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
2011-12-08 23:54:21 +00:00
Douglas Gregor 322f633c1c Tweak the syntax of umbrella headers, so that "umbrella" is treated as
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
2011-12-08 18:00:48 +00:00
Douglas Gregor 73141fa98d Within the module representation, generalize the notion of an umbrella
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
2011-12-08 17:39:04 +00:00
Douglas Gregor 734410916a Parse inferred submodules in module maps, track their contents in
Module, and (de-)serialize this information. Semantics of inferred
submodules to follow.

llvm-svn: 145864
2011-12-05 22:27:44 +00:00
Douglas Gregor 8c7c83522b Fix printing of wildcard exports.
llvm-svn: 145812
2011-12-05 17:34:59 +00:00
Douglas Gregor f5eedd05db Implement support for wildcard exports in modules, allowing a module
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
2011-12-05 17:28:06 +00:00
Douglas Gregor 24bb923aa8 Implement (de-)serialization of the set of exported modules in a
module map. 

llvm-svn: 145695
2011-12-02 18:58:38 +00:00
Eric Christopher af6431077c Add support for AVX registers to clang inline asm. Add a small testcase
and update the Sema testcase with a register that we won't hit for a while
I hope.

Fixes rdar://10510405

llvm-svn: 145671
2011-12-02 02:12:16 +00:00
Eli Friedman bfd5addf4c When we're passing a vector with an illegal type through memory on x86-64, 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
2011-12-02 00:11:43 +00:00
Benjamin Kramer 6bd51593ca Add support for AMD's bulldozer.
llvm-svn: 145606
2011-12-01 18:23:59 +00:00
Douglas Gregor de3ef502a9 Promote ModuleMap::Module to a namespace-scope class in the Basic
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
2011-11-30 23:21:26 +00:00
Daniel Dunbar 787032b88e Fix some possible gcc-4.2 may be used uninitialized warnings.
llvm-svn: 145293
2011-11-28 22:19:36 +00:00
Rafael Espindola a6416a7c73 Make our handling of MMX x SSE closer to what gcc does:
* 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
2011-11-27 20:00:43 +00:00
James Molloy c445be4b4b AAPCS compliance - 32-bit wchar_t should be unsigned for both aapcs and 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
2011-11-23 13:35:08 +00:00
NAKAMURA Takumi 32f1acf14a Revert r132539 for now, "My testing shows that function stat has no problem with trailing separators. (tested on Windows and Darwin)."
It caused PR10331. MSVCRT stat() cannot strip trailing '/'. (can '\')

llvm-svn: 144884
2011-11-17 06:16:05 +00:00
Douglas Gregor 9dc3212f98 Implement (de-)serialization of the buffer contents for an overridden
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
2011-11-16 20:05:18 +00:00
Douglas Gregor 7d106e423e Add a -cc1-level option -fmodule-name=<name>, which will be used when
building modules.

llvm-svn: 144680
2011-11-15 19:35:01 +00:00
Benjamin Kramer 176a5cb38a Warning option typo correction: When two options have the same edit_distance don't display either.
Also add a maximum edit distance threshold, so we don't correct "-Wx" to "-W#pragma-messages".

llvm-svn: 144644
2011-11-15 12:26:39 +00:00
Benjamin Kramer 116d8879e6 Print a typo correction hint for unknown warning flags.
$ clang -Wololo t.c
warning: unknown warning option '-Wololo'; did you mean '-Wall'? [-Wunknown-warning-option]

llvm-svn: 144591
2011-11-14 23:30:34 +00:00
Douglas Gregor 7240a95282 Define some built-ins macros on mips32 platform, from Simon Atanasyan!
llvm-svn: 144189
2011-11-09 15:17:16 +00:00
Argyrios Kyrtzidis c137d0d62f [PCH] Fix reading from PCH of diagnostic pragmas.
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
2011-11-09 01:24:17 +00:00
Benjamin Kramer 44f91da8cc Use StringRef's case transformation methods.
llvm-svn: 143889
2011-11-06 20:36:48 +00:00
Akira Hatanaka 8cc2e865bc Move definitions of SizeType and PtrDiffType to Mips32TargetInfoBase.
llvm-svn: 143775
2011-11-05 01:48:34 +00:00
Douglas Gregor 07216d174e Fix various minor issues find via unreachable code warnings, from
Ahmed Charles!

llvm-svn: 143569
2011-11-02 20:52:01 +00:00
Eli Friedman 2ae0e1e279 Move ConvertUTF8toUTF32 out of #if 0, in preparation for a patch which needs it.
llvm-svn: 143415
2011-11-01 02:10:54 +00:00
Anders Carlsson 2f1a6c3f01 In x86_64, when calling an Objective-C method that returns a _Complex long 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
2011-10-31 16:27:11 +00:00
Roman Divacky ce253d89a2 Add support for sse4a and enable it for amdfam10 cpu.
llvm-svn: 143312
2011-10-30 13:47:56 +00:00
Roman Divacky 43eb6f8aeb Add support for amdfam10 cpu.
llvm-svn: 143305
2011-10-30 07:48:46 +00:00
Douglas Gregor 935bc7a214 Make the loading of information attached to an IdentifierInfo from an
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
2011-10-27 09:33:13 +00:00
Argyrios Kyrtzidis 8edffaa611 Use assert(0) instead of duplicating the check, suggestion by Anna.
llvm-svn: 142886
2011-10-25 00:29:44 +00:00
Dan Gohman 93127aecb9 Remove the Blackfin backend.
llvm-svn: 142881
2011-10-25 00:06:12 +00:00
Dan Gohman 53bb0ff685 Remove the SystemZ backend.
llvm-svn: 142879
2011-10-24 23:48:52 +00:00
Akira Hatanaka c12a271b55 Make changes necessary for N32/64 ABI conformance.
- 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
2011-10-22 00:07:27 +00:00
Ted Kremenek 337c5b880c Further refine the diagnostic categories for ARC diagnostics. Addresses <rdar://problem/10245086>.
llvm-svn: 142571
2011-10-20 05:07:47 +00:00
Benjamin Kramer 80ca407610 Use llvm::Triple's methods to parse FreeBSD version numbers.
Who could've thought that FreeBSD would ever reach version 10!
Patch from Dimitry Andric.

llvm-svn: 142349
2011-10-18 10:10:08 +00:00
Douglas Gregor ebf0049901 For modules, all macros that aren't include guards are implicitly
public. Add a __private_macro__ directive to hide a macro, similar to
the __module_private__ declaration specifier.

llvm-svn: 142188
2011-10-17 15:32:29 +00:00
Benjamin Kramer a518b22d6b Place static initializers on linux into the ".text.startup" section, so the 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
2011-10-15 17:53:33 +00:00
Anton Korobeynikov f0c267e6e0 Provide half floating point support as a storage only type.
Lack of half FP was a regression compared to llvm-gcc.

llvm-svn: 142016
2011-10-14 23:23:15 +00:00
Eli Friedman 4b72fddd99 Misc fixes for atomics. Biggest fix is doing alignment correctly for _Atomic types.
llvm-svn: 142002
2011-10-14 20:59:01 +00:00
Bob Wilson 73a4deb33d Change __extension__ to disable only diagnostics controlled by -pedantic.
This changes clang to match GCC's behavior for __extension__, which temporarily
disables the -pedantic flag.  Warnings that are enabled without -pedantic
are not affected.  Besides the general goodness of matching GCC's precedent,
my motivation for this is that macros in the arm_neon.h header need to use
__extension__ to avoid pedantic complaints about their use of statement
expressions, yet we still want to warn about incompatible pointer arguments
for those macros.

llvm-svn: 141804
2011-10-12 19:55:31 +00:00
Anton Korobeynikov 804dd056b3 Add target info for Linux on PPC & Sparc.
Patch by Hal Finkel!

llvm-svn: 141772
2011-10-12 09:30:58 +00:00
Argyrios Kyrtzidis 7f6b029c4e Introduce SourceManager::getFileLoc which returns a file location
taking into account macro arguments.

llvm-svn: 141771
2011-10-12 07:07:40 +00:00
Richard Smith 4dd85d6fa1 Add a -Wc++0x-compat warning for C++11 keywords used as identifiers when in
C++98 mode. Only the first occurrence of each keyword will produce a warning.

llvm-svn: 141700
2011-10-11 19:57:52 +00:00
David Meyer bfdbb25af2 Allow regparm attribute for PNaCl target
llvm-svn: 141638
2011-10-11 03:12:01 +00:00
Lang Hames 4f4aa1a03a Fixed natural stack alignment for Linux x86-32. Thanks Eli.
llvm-svn: 141617
2011-10-11 00:52:51 +00:00
Lang Hames 60b2b2ee0d Update target data strings for ARM and X86 to include the natural stack
alignment parameter "S<size>" that was introduced in r141599.

llvm-svn: 141601
2011-10-10 23:44:43 +00:00
Eli Friedman 1f19100451 Add address spaces for TCE target. Patch by Pekka Jääskeläinen.
llvm-svn: 141390
2011-10-07 19:51:42 +00:00
Daniel Dunbar 2fba0979fe Basic/Diagnostics: Apparently, #pragma ... diagnostic is intended to override
the command line options (at least according to GCC's documentation). GCC 4.2
didn't appear to actually do this, but it seems like that has been fixed in
later release, so we will follow the docs.

llvm-svn: 141119
2011-10-04 21:17:24 +00:00
Argyrios Kyrtzidis 25029d499e Make sure SourceManager::getFileIDLoaded doesn't hang in release build because of invalid passed parameter.
rdar://10210140

llvm-svn: 141048
2011-10-03 23:43:01 +00:00
Justin Holewinski 794c205e52 PTX: Add some basic support for OpenCL address spaces
llvm-svn: 141008
2011-10-03 17:28:37 +00:00
Daniel Dunbar 866fcd34a6 Basic/Diagnostic: Kill off a few unnecessary functions now that refactoring is done, and add a note that the new setDiagnosticGroup{...} methods only operate on the current diagnostic state.
llvm-svn: 140771
2011-09-29 02:03:01 +00:00
Daniel Dunbar 58d0af6c5f Basic/Diagnostics: Rewrite DiagnosticIDs::getDiagnosticLevel completely to be straighter line code, use the new DiagnosticMappingInfo flags, and eliminate the odd MAP_WARNING_NO_WERROR and friend mappings.
- This fixes a host of obscure bugs with regards to how warning mapping options composed with one another, and I believe makes the code substantially easier to read and reason about.

llvm-svn: 140770
2011-09-29 01:58:05 +00:00
Daniel Dunbar fffcf21cf2 Basic/Diagnostics: Add three explicit bits to DiagnosticMappingInfo to track "no-warning-as-error", "no-error-as-fatal", and "show-in-system-header", and update DiagnosticsEngine::setDiagnosticGroup{WarningAsError,ErrorAsFatal} and GetDefaultDiagMappingInfo to set them appropriately.
- No actual functionality change for now, we still also use the diag::Mapping::{MAP_WARNING_NO_ERROR,MAP_ERROR_NO_FATAL,MAP_WARNING_SHOW_IN_SYSTEM_HEADER} for a little while longer.

llvm-svn: 140768
2011-09-29 01:52:06 +00:00
Daniel Dunbar d908c12db8 Basic/Diagnostics: Add a DiagnosticIDs::getDiagnosticsInGroup method, and use
that in DiagnosticEngine instead of the convoluted calling into DiagnosticIDs
which then calls back into the DiagnosticsEngine.

llvm-svn: 140766
2011-09-29 01:47:16 +00:00
Daniel Dunbar e8c12a2979 Basic/Diagnostic: Add a DiagSate::getOrAddMappingInfo method.
- Also, spell const_iterator as const_iterator.

llvm-svn: 140765
2011-09-29 01:42:25 +00:00
Daniel Dunbar 458edfa2b7 Basic/Diagnostics: Move setDiagnosticMapping() to using DiagnosticMappingInfo
and eliminate setDiagnosticMappingInternal.

llvm-svn: 140763
2011-09-29 01:34:47 +00:00
Daniel Dunbar a3637e6894 Basic/Diagnostics: Add a DiagnosticMappingInfo helper class, and switch to
storing mappings with that instead of straying some magic constants about the
source.

llvm-svn: 140760
2011-09-29 01:30:00 +00:00
Daniel Dunbar 9c78496d51 Basic/Diagnostics: Eliminate getDiagnosticMappingInfo method, which wasn't worth methodizing.
llvm-svn: 140759
2011-09-29 01:25:14 +00:00
Daniel Dunbar 400e7e3b39 Basic/Diagnostic: Eliminate the extra "mapping" out-parameter now that I killed the sole client.
llvm-svn: 140756
2011-09-29 01:20:28 +00:00
Daniel Dunbar aa11138543 Basic/Diagnostics: Add an isDefaultMappingAsError method, and switch TextDiagnosticPrinter to use that instead of extracting the current mapping via getDiagnosticLevel, which fixes one class of corner cases w.r.t. printing the "-Werror" diagnostic option marker.
- The TextDiagnosticPrinter code is still fragile as it is just "reverse engineering" what the diagnostic engine is doing. Not my current priority to fix though.

llvm-svn: 140752
2011-09-29 01:01:08 +00:00
Daniel Dunbar c2e5ca6e50 Basic/Diagnostic: Factor out
DiagnosticsEngine::setDiagnosticGroup{ErrorAsFatal,WarningAsError} methods which
more accurately model the correct API -- no internal change to the diagnostics
engine yet though.
 - Also, stop honoring -Werror=everything (etc.) as a valid (but oddly behaved) option.

llvm-svn: 140747
2011-09-29 00:53:47 +00:00
Daniel Dunbar 6de48ee860 Basic/Diagnostics: Split out the default warning "no-Werror" and
"show-in-system-header" bits, which is part of teasing them apart from the
diagnostic mapping kind.

llvm-svn: 140742
2011-09-29 00:34:06 +00:00
Chandler Carruth 3270e2619e Fix a typo spotted by Jonathan Sauer.
llvm-svn: 140708
2011-09-28 18:17:30 +00:00
Chandler Carruth 7d8241cf4f Attempt to silence the GCC -Wreturn-type warning...
llvm-svn: 140693
2011-09-28 10:49:06 +00:00
Chandler Carruth cd99bad4ac Generate tests for all of the x86 SIMD instruction feature set
predefines based on the output of GCC as well as the CPU predefines.

Invert tests for __AVX__, Clang's AVX feature is hard coded off still.

Switch Atom from 'SSE3' to 'SSSE3'. This matches GCC's behavior, Intel's
documentation, and ICC's documentation (such as I could dig up).

Switch Athlon and Geode to enable 3dnowa rather than just 3dnow and
nothing (resp.).

llvm-svn: 140692
2011-09-28 10:36:46 +00:00
Chandler Carruth 5d0feef373 Fix a think-o on my part that got enshrined in a FIXME by setting up the
__tune_...__ define as well.

llvm-svn: 140690
2011-09-28 09:54:11 +00:00
Chandler Carruth 3f7ed950fd Move some of the defines down to more natural locations, consolidating
the target identifying macros at the top, including subtarget macros.

llvm-svn: 140689
2011-09-28 09:54:07 +00:00
Chandler Carruth 6e20c2bd35 Teach Clang to reject 32-bit only CPUs when compiling in 64-bit mode.
Add 64-bit preprocessor macro tests.

llvm-svn: 140688
2011-09-28 09:45:08 +00:00
Chandler Carruth df5f48ac99 Simplify the control flow for predefined macro selection by using
fallthrough now that we're working with a switch. Also remove a dubious
"feature" regarding k6 processors and 3dnow and leave a fixme... Not
that anyone is likely to care about correct tuning for k6 processors
with and w/o 3dnow...

llvm-svn: 140687
2011-09-28 09:45:05 +00:00
Chandler Carruth 212334f7ab Switch the X86TargetInfo object from a string representation of the
selected CPU model to the enumeration. This parses the string
representation once using a StringSwitch on SetCPU. It returns an error
for strings which are not recognized (yay!). Finally it replaces
ridiculous if-chains with switches that cover all enumerators.

The last change required adding several missing entries to the features
function. These were obvious on inspection. Yay for a pattern that gives
warnings when we miss one.

No new test cases yet, as I want to get the 64-bit errors working first.
I'll then start fleshing out the testing more. Currently I'm primarily
testing on Linux, but I'm hoping check whether there are interesting
differences on darwin before long...

llvm-svn: 140685
2011-09-28 08:55:37 +00:00
Chandler Carruth 3ac7aeaacb Introduce an enumeration for the x86 CPUs recognized by Clang. I've
tried to give these nice doxyments, but if I've gotten any of my history
wrong, please chime in.

llvm-svn: 140684
2011-09-28 08:55:34 +00:00
Chandler Carruth 8bdcf9ea12 Clean up a bit of the uses of CPU in the TargetInfo classes. This makes
it an error if a CPU is provided for a target that doesn't implement
logic handling CPU settings, to match the ABI settings. It also removes
the CPU parameter from the getDefaultFeatures method. This parameter was
always filled in with the same value as setCPU was called with, and at
this point every single target implementation that referenced the CPU
within this function has needed to store the CPU via setCPU anyways in
order to implement other interface points.

llvm-svn: 140683
2011-09-28 05:56:05 +00:00
Chandler Carruth 5ac1e8e6b1 Begin fixing Clang's predefined macros for various architectures. This
is *very* much a WIP that I'll be refining over the next several
commits, but I need to get this checkpoint in place for sanity.

This also adds a much more comprehensive test for architecture macros,
which is roughly generated by inspecting the behavior of a trunk build
of GCC. It still requires some massaging, but eventually I'll even check
in the script that generates these so that others can use it to append
more tests for more architectures, etc.

Next up is a bunch of simplification of the Targets.cpp code, followed
by a lot more test cases once we can reject invalid architectures.

llvm-svn: 140673
2011-09-28 02:59:25 +00:00
Argyrios Kyrtzidis 04a6e5f82e Break SourceManager::translateFileLineCol into translateFile, no functionality change.
llvm-svn: 140610
2011-09-27 17:22:25 +00:00
Argyrios Kyrtzidis 4bdd6aa198 Associate the macro arguments location map with a FileID instead
of a ContentCache, since multiple FileIDs can have the same ContentCache
but the expanded macro arguments locations will be different.

llvm-svn: 140521
2011-09-26 08:01:50 +00:00
David Blaikie b5784324b3 Rename DiagnosticInfo to Diagnostic as per issue 5397
llvm-svn: 140493
2011-09-26 01:18:08 +00:00
David Blaikie e2eefaecc8 Rename DiagnosticClient to DiagnosticConsumer as per issue 5397
llvm-svn: 140479
2011-09-25 23:39:51 +00:00
David Blaikie 9c902b5502 Rename Diagnostic to DiagnosticsEngine as per issue 5397
llvm-svn: 140478
2011-09-25 23:23:43 +00:00
David Blaikie 76bd3c80d4 Fix missing includes for llvm_unreachable
llvm-svn: 140368
2011-09-23 05:35:21 +00:00
David Blaikie 83d382b1ca Switch assert(0/false) llvm_unreachable.
llvm-svn: 140367
2011-09-23 05:06:16 +00:00
Justin Holewinski 0542df5198 PTX: Clean up target options code
llvm-svn: 140320
2011-09-22 17:57:40 +00:00
Argyrios Kyrtzidis 7c2b28a16f In SourceManager::translateLineCol, handle the case where we are pointing
directly at the end of the source file.

llvm-svn: 140192
2011-09-20 22:14:54 +00:00
Akira Hatanaka bef1745c9c Define Mips64 TargetInfo classes.
llvm-svn: 140174
2011-09-20 19:21:49 +00:00
Akira Hatanaka f6da331e15 Clean up TargetInfo class hierarchy. Define a base class from which TargetInfos
of Mips32 big and little endian derive.

llvm-svn: 140170
2011-09-20 19:00:23 +00:00
Ivan Krasin 96a806199d Clarify PNaCl target characteristics: set LongDoubleWidth, PtrDiffType, IntPtrType,
change __builtin_va_list to from a structure to int[4] (same alignment
and size, but with a simpler representation). Patch by David Meyer!

llvm-svn: 140144
2011-09-20 14:56:54 +00:00
Argyrios Kyrtzidis 7c06d8666b [libclang] When getting a source location from a file:line:col triplet
check whether the requested location points inside the precompiled preamble,
in which case the returned source location will be a "loaded" one.

llvm-svn: 140060
2011-09-19 20:40:35 +00:00
Argyrios Kyrtzidis 532c5196b0 Break SourceManager::translateFileLineCol into translateLineCol that returns the
source location of line:col of a specific FileID.

llvm-svn: 140059
2011-09-19 20:40:29 +00:00
Argyrios Kyrtzidis e6e67deeed Rename SourceLocation::getFileLocWithOffset -> getLocWithOffset.
It already works (and is useful with) macro locs as well.

llvm-svn: 140057
2011-09-19 20:40:19 +00:00
Argyrios Kyrtzidis b4199b659b For SourceManager::isBeforeInTranslationUnit, a location pointing
inside a macro argument should be regarded as coming before
the location of the expanded tokens.

llvm-svn: 140053
2011-09-19 20:39:57 +00:00
Francois Pichet 0706d203cf Rename LangOptions::Microsoft to LangOptions::MicrosoftExt to make it clear that this flag must be used only for Microsoft extensions and not emulation; to avoid confusion with the new LangOptions::MicrosoftMode flag.
Many of the code now under LangOptions::MicrosoftExt will eventually be moved under the LangOptions::MicrosoftMode flag.

llvm-svn: 139987
2011-09-17 17:15:52 +00:00