Commit Graph

113070 Commits

Author SHA1 Message Date
Argyrios Kyrtzidis c284238aa2 Make ASTReader/ASTWriter friends of SourceLocation. They already
depend on internal knowledge of SourceLocation.

llvm-svn: 140056
2011-09-19 20:40:08 +00:00
Argyrios Kyrtzidis 9671ea9387 Introduce isLoadedSourceLocation() and isLocalSourceLocation() methods in SourceManager.
llvm-svn: 140055
2011-09-19 20:40:05 +00:00
Argyrios Kyrtzidis d67164e3cd Const-ify some methods in ASTReader.
llvm-svn: 140054
2011-09-19 20:40:02 +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
Argyrios Kyrtzidis b527a7cbf8 [PCH] Preload the PreloadSLocEntries through the SourceManager and
don't call ReadSLocEntryRecord() directly because the entry may have
already been loaded in which case calling ReadSLocEntryRecord()
directly would trigger an assertion in SourceManager.

llvm-svn: 140052
2011-09-19 20:39:54 +00:00
Argyrios Kyrtzidis 8b7c08b897 For SourceManager::isBeforeInTranslationUnit, when one location
points at the inclusion/expansion point of the other, regard this
as coming before the other.

llvm-svn: 140051
2011-09-19 20:39:51 +00:00
Jim Grosbach 1a23fbb9fd Tidy up a bit.
llvm-svn: 140050
2011-09-19 20:31:59 +00:00
Bill Wendling f0724e8e06 Throw the switch to convert clang to the new exception handling model!
This model uses the 'landingpad' instruction, which is pinned to the top of the
landing pad. (A landing pad is defined as the destination of the unwind branch
of an invoke instruction.) All of the information needed to generate the correct
exception handling metadata during code generation is encoded into the
landingpad instruction.

The new 'resume' instruction takes the place of the llvm.eh.resume intrinsic
call. It's lowered in much the same way as the intrinsic is.

llvm-svn: 140049
2011-09-19 20:31:14 +00:00
Jim Grosbach ee9ff79319 Remove FIXME. TBB/TBH are Thumb mode only instructions.
llvm-svn: 140048
2011-09-19 20:30:29 +00:00
Jim Grosbach 8221319707 Thumb2 assembly parsing and encoding for SXTB/SXTB16/SXTH.
llvm-svn: 140047
2011-09-19 20:29:33 +00:00
Akira Hatanaka 79738336a8 Make changes to avoid creating nested CALLSEQ_START/END constructs, which aren't
yet legal according to comments in LegalizeDAG.cpp:227. 

Memcpy nodes created for copying byval arguments are inserted before
CALLSEQ_START.

The two failing tests reported in PR10876 pass after applying this patch.  

llvm-svn: 140046
2011-09-19 20:26:02 +00:00
Benjamin Kramer 444f079d34 Nope, there's another one!
llvm-svn: 140045
2011-09-19 20:23:01 +00:00
Benjamin Kramer babc5291f4 Missed one instance of implicit pointer conversion.
llvm-svn: 140044
2011-09-19 20:14:46 +00:00
Benjamin Kramer c20a3ebba0 Silence -Wsign-compare warnings from GCC.
llvm-svn: 140043
2011-09-19 20:08:54 +00:00
Benjamin Kramer 78ee973788 Try to make MSVC 2010 happy.
llvm-svn: 140042
2011-09-19 20:08:52 +00:00
Owen Anderson 8c021d85a6 Specify an additional fixed bit in the Thumb2 SSAT encoding to prevent the decoder from emitting gibberish for this invalid encoding.
llvm-svn: 140041
2011-09-19 20:00:02 +00:00
Eli Friedman 222b5a4f5a Fix a typo in the bitcode reader in the handling of atomic stores. Reported by David Meyer on llvmdev.
llvm-svn: 140040
2011-09-19 19:41:28 +00:00
Richard Trieu 01fc001062 Changes to the name lookup have caused a regression in the digraph fix-it hint.
For instance:

template <class T> void E() {};
class F {};

void test() {
 ::E<::F>();
 E<::F>();
}

Gives the following error messages:

error: found '<::' after a template name which forms the
     digraph '<:' (aka '[') and a ':', did you mean '< ::'?
 ::E<::F>();
    ^~~
    < ::
error: expected expression
 E<::F>();
    ^
error: expected ']'
note: to match this '['
 E<::F>();

This patch adds the digraph fix-it check right before the name lookup,
moves the shared checking code to a new function, and adds new
tests to catch future regressions.

llvm-svn: 140039
2011-09-19 19:01:00 +00:00
Devang Patel 5a54065c4f Tighten check to match an ivar with corresponding property by using ObjCImplementationDecl.
Radar 10139522 - Part 1.

llvm-svn: 140038
2011-09-19 18:54:16 +00:00
Johnny Chen 870f4f4213 The r139982 patch has a bug by using the constant "x86_AVX_STATE64".
Patch by Filipe.

llvm-svn: 140037
2011-09-19 18:54:01 +00:00
Matt Beaumont-Gay dcaacaa190 Fix a QoI bug with overloaded operators inside macros.
We were failing to set source locations and ranges in isUnusedResultAWarning
for CXXOperatorCallExprs, leading to an "expression result unused" warning
with absolutely no context if the expression was inside a macro.

llvm-svn: 140036
2011-09-19 18:51:20 +00:00
Jim Grosbach 40700e0992 ARM asm parsing should handle pre-indexed writeback w/o immediate.
For example, 'ldrb r9, [sp]!' is odd, but valid.

llvm-svn: 140035
2011-09-19 18:42:21 +00:00
David Greene 39db48d0d4 Better Error Reporting
Report missing template arguments more helpfully by supplying the name
of the missing argument in the error message.

llvm-svn: 140034
2011-09-19 18:26:07 +00:00
Jakob Stoklund Olesen 1c4831764c X86 has asterisk-free inline asm support now.
Floating point stack inline asm works.

llvm-svn: 140033
2011-09-19 18:15:46 +00:00
Owen Anderson ddfcec92d9 Handle STRT (and friends) like LDRT (and friends) for decoding purposes. Port over additional encoding tests to decoding tests.
llvm-svn: 140032
2011-09-19 18:07:10 +00:00
Fariborz Jahanian e20c0a5a66 objc - some refactoring of my last 'self' patch.
llvm-svn: 140031
2011-09-19 18:06:07 +00:00
John McCall 28a5b326e1 In apple-kext mode, use external linkage for explicit template instantiations
instead of internal linkage.

llvm-svn: 140030
2011-09-19 18:05:26 +00:00
Jim Grosbach 264abdecf0 Thumb2 assembly parsing and encoding for SXTAB/SXTAB16/SXTAH.
llvm-svn: 140029
2011-09-19 17:56:37 +00:00
Benjamin Kramer 43a772eda1 Add a MachO-specific "mode" to llvm-objdump, that, if enabled, gathers additional information that are only available on MachO.
- It can take FunctionStarts from a binary to find entry points more accurately.
- Symbol offsets in executables are correct now.

llvm-svn: 140028
2011-09-19 17:56:04 +00:00
Benjamin Kramer 1223416411 MCInstrAnalysis: Don't crash on instructions with no operands.
llvm-svn: 140027
2011-09-19 17:56:00 +00:00
Andrew Trick 7251e41b16 [indvars] Fix PR10946: SCEV cannot handle Vector IVs.
llvm-svn: 140026
2011-09-19 17:54:39 +00:00
Jim Grosbach ec7c23eed3 Thumb2 assembly parsing and encoding for SVC.
llvm-svn: 140025
2011-09-19 17:40:35 +00:00
Jim Grosbach aa4c0d3986 Thumb2 assembly parsing and encoding for SUB(register).
llvm-svn: 140024
2011-09-19 17:37:48 +00:00
Howard Hinnant c756bb3574 Chris Jefferson noted that vector iterator ownership can be transferred from source to target under move construction and move assignment. This commit makes that happen for debug mode.
llvm-svn: 140023
2011-09-19 16:34:29 +00:00
Fariborz Jahanian a195a5182c CurContext cannot be null ever.
llvm-svn: 140022
2011-09-19 16:32:32 +00:00
Erik Verbruggen 631dfc6229 Removed an unused field and its accessors methods.
llvm-svn: 140017
2011-09-19 15:10:40 +00:00
Erik Verbruggen 852725b615 First test commit.
llvm-svn: 140016
2011-09-19 15:03:11 +00:00
Richard Smith c94ec84a3d In constructors, don't generate implicit initializers for members of anonymous structs contained within anonymous unions.
llvm-svn: 140015
2011-09-19 13:34:43 +00:00
Howard Hinnant cdcfbf26dc Removed unneeded boost implementation of is_base_of
llvm-svn: 140014
2011-09-19 13:19:31 +00:00
Richard Smith b83e3eb37d Remove function which is unused as of r139996. Thanks to David Blaikie for bringing this to my attention.
llvm-svn: 140013
2011-09-19 11:19:27 +00:00
Stepan Dyatkovskiy 12746ea313 Added regression test for bug #10869.
llvm-svn: 140012
2011-09-19 07:48:08 +00:00
NAKAMURA Takumi dbd883b915 Add Win32 support to llvm::llvm_execute_on_thread(). Thanks to Aaron Ballman!
llvm-svn: 140011
2011-09-19 07:41:43 +00:00
Jakob Stoklund Olesen 10acf3577f Claimed.
llvm-svn: 140010
2011-09-19 05:34:10 +00:00
Francois Pichet 26e809692a Do not use builtin includes if -fms-compatibility is specified. Some MSVC header files have the same name as clang's builtins, this creates clash.
llvm-svn: 140009
2011-09-19 05:15:54 +00:00
Francois Pichet 39cba5343d Move the "jump bypasses variable initialization" error -> warning downgrade from -fms-extensions to -fms-compatibility.
llvm-svn: 140008
2011-09-18 21:48:27 +00:00
Francois Pichet 08d2fa0a78 In Microsoft mode(-fms-compatibility), prefer an integral conversion to a floating-to-integral conversion if the integral conversion is between types of the same size.
For example:
 void f(float);
 void f(int);
 int main {
    long a;
    f(a);
 }
Here, MSVC will call f(int) instead of generating a compile error as clang will do in standard mode.
This fixes a few errors when parsing MFC code with clang.

llvm-svn: 140007
2011-09-18 21:37:37 +00:00
David Chisnall 0a0f599f2c Enable __locale to work on FreeBSD.
llvm-svn: 140005
2011-09-18 19:23:04 +00:00
Nadav Rotem 763c11cc12 Fix typos in my prev commit, found by Tobi.
llvm-svn: 140003
2011-09-18 19:00:23 +00:00
Greg Clayton 762f7135e2 Don't put modules for .o files into the global shared module list. We
used to do this because we needed to find the shared pointer for a .o
file when the .o file's module was needed in a SymbolContext since the
module in a symbol context was a shared pointer. Now that we are using
intrusive pointers we don't have this limitation anymore since any
instrusive shared pointer can be made from a pointer to an object
all on its own.

Also switched over to having the Module and SymbolVendor use shared 
pointers to their object files as had a leak on MacOSX when the 
SymbolVendor's object file wasn't the same as the Module's (debug info
in a stand along file (dSYM file)). Now everything will correctly clean
itself up when the module goes away after an executable gets rebuilt.

Now we correctly get rid of .o files that are used with the DWARF with 
debug map executables on subsequent runs since the only shared pointer
to the object files in from the DWARF symbol file debug map parser, and
when the module gets replaced, it destroys to old one along with all .o 
files. 

Also added a small optimization when using BSD archives where we will
remove old BSD containers from the shared list when they are outdated.

llvm-svn: 140002
2011-09-18 18:59:15 +00:00
Nadav Rotem 261a10a007 setOperationAction should be done on the return value of the type, not the operands.
llvm-svn: 140001
2011-09-18 14:57:03 +00:00