Commit Graph

91550 Commits

Author SHA1 Message Date
Devang Patel bf3b62d356 Add README.txt and very first test case.
llvm-svn: 113797
2010-09-13 22:25:34 +00:00
Sebastian Redl 5c649bc7bb Don't crash when using type traits on a class with a constructor template.
llvm-svn: 113796
2010-09-13 22:18:28 +00:00
Devang Patel 058f3854ff A place for debug info tests.
llvm-svn: 113795
2010-09-13 22:04:42 +00:00
Sebastian Redl c15c326b51 Remove CXXRecordDecl::getDefaultConstructor(), an inherently unsafe function due to lazy declaration of default constructors. Now that __has_nothrow_constructor doesn't use it anymore, part of PR8101 is fixed.
llvm-svn: 113794
2010-09-13 22:02:47 +00:00
Eric Christopher 26c045d9ff Try to get this to stop leaving a temporary file on linux.
llvm-svn: 113793
2010-09-13 21:51:42 +00:00
Sean Callanan 9e6ed53ea5 Bugfixes to the expression parser. Fixes include:
- If you put a semicolon at the end of an expression,
   this no longer causes the expression parser to
   error out.  This was a two-part fix: first,
   ClangExpressionDeclMap::Materialize now handles
   an empty struct (such as when there is no return
   value); second, ASTResultSynthesizer walks backward
   from the end of the ASTs until it reaches something
   that's not a NullStmt.

 - ClangExpressionVariable now properly byte-swaps when
   printing itself.

 - ClangUtilityFunction now cleans up after itself when
   it's done compiling itself.

 - Utility functions can now use external functions just
   like user expressions.

 - If you end your expression with a statement that does
   not return a value, the expression now runs correctly
   anyway.

Also, added the beginnings of an Objective-C object
validator function, which is neither installed nor used
as yet.

llvm-svn: 113789
2010-09-13 21:34:21 +00:00
Jakob Stoklund Olesen 535e8e5f60 Let's just declare that it is impossible to construct a std::pair from a null
pointer and work around that.

llvm-svn: 113788
2010-09-13 21:29:45 +00:00
Devang Patel 42be03b4a0 Fix typo in temp. script file name.
llvm-svn: 113787
2010-09-13 21:23:17 +00:00
Dale Johannesen 1eea351920 Fix typos. 128-bit PSHUFB takes 128-bit memory op.
v8i16 is not an MMX type; put it where it belongs.

llvm-svn: 113785
2010-09-13 21:15:43 +00:00
Sebastian Redl 951006f510 Have __has_nothrow_copy use Sema's lookup routines. This fixes the problem with not finding implicitly declared copy constructors, part of PR8107.
llvm-svn: 113784
2010-09-13 21:10:20 +00:00
Dale Johannesen b1248ffe9d Basic smoke test for new x86mmx type.
llvm-svn: 113783
2010-09-13 21:01:36 +00:00
Sebastian Redl 8eb06f17c4 Eagerly evaluate type traits in Sema instead of lazily in AST. They actually need Sema access to be correct, fixes coming up.
llvm-svn: 113782
2010-09-13 20:56:31 +00:00
Johnny Chen 1394a4b715 Extend the build mechanism to allow for specifying the compiler used to build
the binaries.

If the build* function is passed the compiler argument, for example, 'llvm-gcc',
it is passed as a make variable to the make command.  Otherwise, we check the
LLDB_CC environment variable; if it is defined, it is passed as a make variable
to the make command.

If neither the compiler keyword argument nor the LLDB_CC environment variable is
specified, no CC make variable is passed to the make command.  The Makefile gets
to define the default CC being used.

--------------------------------------------------------------------------------
Example usage follows:

o Via the keyword argument:

class ArrayTypesTestCase(TestBase):

    mydir = "array_types"

    @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
    def test_with_dsym_and_run_command(self):
        """Test 'frame variable var_name' on some variables with array types."""
        self.buildDsym(compiler='llvm-gcc')
        self.array_types()
...

o Via LLDB_CC environment variable:

$ LLDB_CC=llvm-gcc ./dotest.py -v -t array_types
----------------------------------------------------------------------
Collected 4 tests

test_with_dsym_and_python_api (TestArrayTypes.ArrayTypesTestCase)
Use Python APIs to inspect variables with array types. ... 
os command: [['/bin/sh', '-c', 'make clean; make MAKE_DSYM=YES CC=llvm-gcc']]
output: rm -rf "a.out" "a.out.dSYM"  main.o main.d
llvm-gcc -arch x86_64 -gdwarf-2 -O0 -arch x86_64 -gdwarf-2 -O0  -c -o main.o main.c
llvm-gcc -arch x86_64 -gdwarf-2 -O0  main.o -o "a.out"
/usr/bin/dsymutil  -o "a.out.dSYM" "a.out"

...

llvm-svn: 113781
2010-09-13 20:54:30 +00:00
Devang Patel 068b5b3d61 Recognize .ll as input files.
Handle %test_debuginfo on a RUN command line.

This set up now allows one to write small test cases to check debug info.
e.g.

; RUN: %clang -O0 -g %s -c -o %t.o
; RUN: %clang %t.o -o %t.out  
; RUN: %test_debuginfo %s %t.out

define i32 @f1(i32 %i) nounwind ssp {
; DEBUGGER: break f1                                                               
; DEBUGGER: r                                                                      
; DEBUGGER: p i                                                                    
; CHECK: $1 = 42                                                                   
entry:
  %i.addr = alloca i32, align 4
...
...
}

It is also possible now to write test cases in c/c++.
The plan is to store these debug info testcases in a separate place.

llvm-svn: 113780
2010-09-13 20:46:23 +00:00
Devang Patel ddc68dd3a1 Add little test script to check debug info.
llvm-svn: 113779
2010-09-13 20:42:15 +00:00
Argyrios Kyrtzidis 14ec9f674a When applying 'delete' on a pointer-to-array type match GCC and EDG behavior and treat it as 'delete[]'.
Also offer a fix-it hint adding '[]'.

llvm-svn: 113778
2010-09-13 20:15:54 +00:00
Argyrios Kyrtzidis 9b0d1cf47c Remove the trivial setters from CXXDeleteExpr.
llvm-svn: 113777
2010-09-13 20:15:40 +00:00
Benjamin Kramer 65550d7cea Fix linux/msvc build, move include.
llvm-svn: 113776
2010-09-13 20:04:49 +00:00
Owen Anderson 43f9831376 Attempt to fix the Linux build.
llvm-svn: 113773
2010-09-13 19:47:32 +00:00
Owen Anderson 0bf2a926f2 Minimize #includes in a top-level header.
llvm-svn: 113772
2010-09-13 18:47:42 +00:00
Eric Christopher 79127ab3f5 Silence more warnings. Two more unused variables.
llvm-svn: 113771
2010-09-13 18:30:57 +00:00
Owen Anderson fe12f23024 Add a reduced testcase for the infinite loop fixed in r113763.
llvm-svn: 113770
2010-09-13 18:28:40 +00:00
Eric Christopher e3a89f9f9c Remove unused variable.
llvm-svn: 113769
2010-09-13 18:27:59 +00:00
Jim Grosbach 7aeff13cae trailing whitespace
llvm-svn: 113768
2010-09-13 18:25:42 +00:00
Eric Christopher 5f878349ee Silence some constructor ordering warnings.
llvm-svn: 113767
2010-09-13 18:25:05 +00:00
John Thompson 1094c80281 Added skeleton for inline asm multiple alternative constraint support.
llvm-svn: 113766
2010-09-13 18:15:37 +00:00
Dan Gohman 80e85e72b6 Use ParseIRFile to auto-detect LLVM Assembly automatically.
llvm-svn: 113765
2010-09-13 18:02:47 +00:00
Dan Gohman bbcd04dbcc Add full auto-upgrade support for LLVM 2.7 bitcode metadata.
llvm-svn: 113764
2010-09-13 18:00:48 +00:00
Owen Anderson c237a849e3 Re-apply r113679, which was reverted in r113720, which added a paid of new instcombine transforms
to expose greater opportunities for store narrowing in codegen.  This patch fixes a potential
infinite loop in instcombine caused by one of the introduced transforms being overly aggressive.

llvm-svn: 113763
2010-09-13 17:59:27 +00:00
Michael J. Spencer 885611b42b CMake: Add llvm-lit to CMake build.
llvm-svn: 113762
2010-09-13 17:52:38 +00:00
Argyrios Kyrtzidis cebc0f006f Add a compatibility note about clang not implicitly converting between objc_object* and id (and SEL, Class).
llvm-svn: 113761
2010-09-13 17:48:07 +00:00
Argyrios Kyrtzidis 2716b9ae54 Update 'docs/PCHInternals.html' about how subexpressions are stored.
llvm-svn: 113760
2010-09-13 17:48:02 +00:00
Rafael Espindola 9fd2ed9243 Factoring and potential bug fix. The elf "flags" cannot be used as masks.
For example, setting STT_OBJECT (1) and STT_FUNC (2), should not produce
a STT_SECTION (3).

llvm-svn: 113759
2010-09-13 17:39:45 +00:00
Bob Wilson e44f298674 Fix formatting tags.
llvm-svn: 113758
2010-09-13 17:39:35 +00:00
Bob Wilson 46d6580ccf Document NEON intrinsic changes for 2.8.
llvm-svn: 113757
2010-09-13 17:37:55 +00:00
Johnny Chen 9440d1c008 Updated the expected matching strings.
llvm-svn: 113756
2010-09-13 16:59:11 +00:00
Johnny Chen 661f8069c7 Updated the expected matching strings.
llvm-svn: 113755
2010-09-13 16:45:59 +00:00
Douglas Gregor e47191cfe1 Fix a typo noted by Gabor
llvm-svn: 113754
2010-09-13 16:44:26 +00:00
Johnny Chen 8458405a36 Updated the expected matching strings, and added a radar comment.
llvm-svn: 113753
2010-09-13 16:31:46 +00:00
Johnny Chen e00234e0c7 Updated the expected matching strings.
llvm-svn: 113751
2010-09-13 16:19:09 +00:00
Johnny Chen eb1b8dabc0 Removed the two expectedFailure decorators from the test cases. They have been fixed.
llvm-svn: 113750
2010-09-13 16:14:55 +00:00
Fariborz Jahanian 0aa35b9cf5 Block description for trivial block literals have
their 'isa' field scanned regardless.

llvm-svn: 113749
2010-09-13 16:09:44 +00:00
Johnny Chen 9aae728ef6 Updated the expected matching string after the recent flurry of check ins.
llvm-svn: 113748
2010-09-13 16:06:19 +00:00
Duncan Sands 17cd907b6b Nowadays a release build has assertions off.
llvm-svn: 113747
2010-09-13 13:45:33 +00:00
Duncan Sands df65e14397 Spelling fixes in comments.
llvm-svn: 113746
2010-09-13 13:32:22 +00:00
Argyrios Kyrtzidis f24d569f9e Fix C++ PCH issue.
The canonical FunctionTemplateDecl contains the specializations but we cannot use getCanonicalDecl on Template because it may still be initializing.
Write and read it from PCH.
Fixes http://llvm.org/PR8134

llvm-svn: 113744
2010-09-13 11:45:48 +00:00
Argyrios Kyrtzidis 0e8b3ce247 Avoid setters in ASTDeclReader::VisitClassTemplatePartialSpecializationDecl.
llvm-svn: 113743
2010-09-13 11:45:41 +00:00
Argyrios Kyrtzidis b4c659b662 Avoid setters in ASTDeclReader::VisitClassTemplateSpecializationDecl.
llvm-svn: 113742
2010-09-13 11:45:32 +00:00
Argyrios Kyrtzidis caf8248fc5 Avoid setters in ASTDeclReader::VisitCXXRecordDecl.
llvm-svn: 113741
2010-09-13 11:45:25 +00:00
Abramo Bagnara 3aabb4b452 Congruent diagnostic for void* arithmetic.
llvm-svn: 113740
2010-09-13 06:50:07 +00:00