]> granicus.if.org Git - clang/log
clang
12 years agoTests: check for target availability for target-specific tests.
Jim Grosbach [Mon, 9 Jul 2012 18:34:21 +0000 (18:34 +0000)]
Tests: check for target availability for target-specific tests.

Lots of tests are using an explicit target triple w/o first checking that the
target is actually available. Add a REQUIRES clause to a bunch of them. This should
hopefully unbreak bots which don't configure w/ all targets enabled.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159949 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoobjective-c: yank any use of "non-fragile abi" phrase
Fariborz Jahanian [Mon, 9 Jul 2012 17:54:36 +0000 (17:54 +0000)]
objective-c: yank any use of "non-fragile abi" phrase
from diagnostics. // rdar://9657485

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159943 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago80-column and whitespace.
Chad Rosier [Mon, 9 Jul 2012 17:31:28 +0000 (17:31 +0000)]
80-column and whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159942 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoBetter parser recovery in Objective-C containers.
Jordan Rose [Mon, 9 Jul 2012 16:54:53 +0000 (16:54 +0000)]
Better parser recovery in Objective-C containers.

Previously it was possible to get an infinite-loop-on-invalid with a namespace
decl within @interface. Since 'namespace' is normally a safe place to retry
top-level parsing, we just didn't consume the token.

This adds a flag that tracks whether we have temporarily left Objective-C
scope to parse a C-like declaration, and uses that to better recover from
parse problems by stopping at possible method declarations and at @end. To
fix the original problem, we do /not/ stop at 'namespace' when in an
Objective-C @interface or @protocol context (but still do in @implementation).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159941 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[analyzer] When inlining, make sure we use the definition decl.
Jordan Rose [Mon, 9 Jul 2012 16:54:49 +0000 (16:54 +0000)]
[analyzer] When inlining, make sure we use the definition decl.

This was a regression introduced during the CallEvent changes; a call to
FunctionDecl::hasBody was also being used to replace the decl found by
lookup with the actual definition. To keep from making this mistake again
(particularly if/when we start inlining Objective-C methods), this commit
adds a "getDefinition()" method to CallEvent, which should do the right
thing under any circumstances.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159940 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDowngrade the "direct comparison" error for ObjC literals to a warning.
Jordan Rose [Mon, 9 Jul 2012 16:54:44 +0000 (16:54 +0000)]
Downgrade the "direct comparison" error for ObjC literals to a warning.

Chris pointed out that while the comparison is certainly problematic
and does not have well-defined behavior, it isn't any worse than some
of the other abuses that we merely warn about and doesn't need to make
the compilation fail.

Revert the release notes change (r159766) now that this is just a new warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159939 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[CMake] Get rid of unconditional dependency to ClangDiagnosticCommon. Only clangBasic...
NAKAMURA Takumi [Mon, 9 Jul 2012 14:12:20 +0000 (14:12 +0000)]
[CMake] Get rid of unconditional dependency to ClangDiagnosticCommon. Only clangBasic and clangASTMatchers need it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159931 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[cindex.py] fix infinite iteration of compilation database CompileCommands
Arnaud A. de Grandmaison [Mon, 9 Jul 2012 11:57:30 +0000 (11:57 +0000)]
[cindex.py] fix infinite iteration of compilation database CompileCommands

Patch by David Röthlisberger

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159926 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoInline storage of attributes in AttributedStmt.
Alexander Kornienko [Mon, 9 Jul 2012 10:04:07 +0000 (10:04 +0000)]
Inline storage of attributes in AttributedStmt.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159925 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoLinks to the python CXCompilationDatabase documentation.
Manuel Klimek [Mon, 9 Jul 2012 05:17:45 +0000 (05:17 +0000)]
Links to the python CXCompilationDatabase documentation.
Patch contributed by David Roethlisberger.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159923 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoPR13136:
Richard Smith [Mon, 9 Jul 2012 03:07:20 +0000 (03:07 +0000)]
PR13136:

 * When substituting a reference to a non-type template parameter pack where the
   corresponding argument is a pack expansion, transform into an expression
   which contains an unexpanded parameter pack rather than into an expression
   which contains a pack expansion. This causes the SubstNonTypeTemplateParmExpr
   to be inside the PackExpansionExpr, rather than outside, so the expression
   still looks like a pack expansion and can be deduced.

 * Teach MarkUsedTemplateParameters that we can deduce a reference to a template
   parameter if it's wrapped in a SubstNonTypeTemplateParmExpr (such nodes are
   added during alias template substitution).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159922 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoHalve template depth in an attempt to get this test passing on mingw32.
Richard Smith [Sun, 8 Jul 2012 21:06:29 +0000 (21:06 +0000)]
Halve template depth in an attempt to get this test passing on mingw32.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159917 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd missing options for -m(no-){pclmul,fma,xop}.
Benjamin Kramer [Sun, 8 Jul 2012 09:45:00 +0000 (09:45 +0000)]
Add missing options for -m(no-){pclmul,fma,xop}.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159913 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agotest/SemaTemplate/instantiation-depth-defarg.cpp: Mark as XFAIL:mingw for now.
NAKAMURA Takumi [Sun, 8 Jul 2012 09:35:16 +0000 (09:35 +0000)]
test/SemaTemplate/instantiation-depth-defarg.cpp: Mark as XFAIL:mingw for now.

I'll try to increase stack size later.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159912 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMIPS: Range check __builtin_mips_wrdsp / __builtin_mips_rddsp arguments against the...
Simon Atanasyan [Sun, 8 Jul 2012 09:30:00 +0000 (09:30 +0000)]
MIPS: Range check __builtin_mips_wrdsp / __builtin_mips_rddsp arguments against the upper/lower values.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159911 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMIPS: Mark arguments of __builtin_mips_wrdsp / __builtin_mips_rddsp as a constant...
Simon Atanasyan [Sun, 8 Jul 2012 09:10:14 +0000 (09:10 +0000)]
MIPS: Mark arguments of __builtin_mips_wrdsp / __builtin_mips_rddsp as a constant expression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159910 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoPR13243: When deducing a non-type template parameter which is specified as an
Richard Smith [Sun, 8 Jul 2012 04:37:51 +0000 (04:37 +0000)]
PR13243: When deducing a non-type template parameter which is specified as an
expression, skip over any SubstNonTypeTemplateParmExprs which alias templates
may have inserted before checking for a DeclRefExpr referring to a non-type
template parameter declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159909 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoPR13293: Defer deduction of an auto type with a dependent declarator, such as "auto...
Richard Smith [Sun, 8 Jul 2012 04:13:07 +0000 (04:13 +0000)]
PR13293: Defer deduction of an auto type with a dependent declarator, such as "auto (*f)(T t)".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159908 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoPR9793: Treat substitution as an instantiation step for the purpose of the
Richard Smith [Sun, 8 Jul 2012 02:38:24 +0000 (02:38 +0000)]
PR9793: Treat substitution as an instantiation step for the purpose of the
-ftemplate-depth limit.  There are various ways to get an infinite (or merely
huge) stack of substitutions with no intervening instantiations. This is also
consistent with gcc's behavior.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159907 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoASTMatchers/CMakeLists.txt: Add dependencies to generated headers, or "make clean...
NAKAMURA Takumi [Sat, 7 Jul 2012 23:13:30 +0000 (23:13 +0000)]
ASTMatchers/CMakeLists.txt: Add dependencies to generated headers, or "make clean; make ASTMatchers" would fail.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159906 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoReject 'int a[1][];' in Sema rather than crashing in IR generation. Found by a
Richard Smith [Sat, 7 Jul 2012 23:00:31 +0000 (23:00 +0000)]
Reject 'int a[1][];' in Sema rather than crashing in IR generation. Found by a
misreduction of PR13290.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159905 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoPR13290: Constant-evaluation support for CXXConstructExprs which construct a
Richard Smith [Sat, 7 Jul 2012 22:48:24 +0000 (22:48 +0000)]
PR13290: Constant-evaluation support for CXXConstructExprs which construct a
multidimensional array of class type. Also, preserve zero-initialization when
evaluating an initializer list for an array, in case the initializers refer to
later elements (which have preceding zero-initialization).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159904 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoclang/test/CodeGenCXX/cxx0x-initializer-constructors.cpp: Fixup for -Asserts.
NAKAMURA Takumi [Sat, 7 Jul 2012 10:25:42 +0000 (10:25 +0000)]
clang/test/CodeGenCXX/cxx0x-initializer-constructors.cpp: Fixup for -Asserts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159898 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoWire up -mrdrnd for X86.
Benjamin Kramer [Sat, 7 Jul 2012 09:39:18 +0000 (09:39 +0000)]
Wire up -mrdrnd for X86.

For some reason GCC decided to call the feature rdrnd instead of rdrand,
which requires translating it for LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159897 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoPR12670: Support for initializing an array of non-aggregate class type from an
Richard Smith [Sat, 7 Jul 2012 08:35:56 +0000 (08:35 +0000)]
PR12670: Support for initializing an array of non-aggregate class type from an
initializer list. Patch by Olivier Goffart, with extra testcases by Meador Inge
and Daniel Lunow.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159896 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoWhen marking virtual functions as used for a class' vtable, mark all functions
Richard Smith [Sat, 7 Jul 2012 06:59:51 +0000 (06:59 +0000)]
When marking virtual functions as used for a class' vtable, mark all functions
which will appear in the vtable as used, not just those ones which were
declared within the class itself. Fixes an issue reported as comment#3 in
PR12763 -- we sometimes assert in codegen if we try to emit a reference to a
function declaration which we've not marked as referenced. This also matches
gcc's observed behavior.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159895 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDistinguish more carefully between free functions and C++ instance methods
John McCall [Sat, 7 Jul 2012 06:41:13 +0000 (06:41 +0000)]
Distinguish more carefully between free functions and C++ instance methods
in the ABI arrangement, and leave a hook behind so that we can easily
tweak CCs on platforms that use different CCs by default for C++
instance methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159894 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoEnhance 'diagtool list-warnings' to report number of diagnostics covered directly...
Ted Kremenek [Sat, 7 Jul 2012 06:30:31 +0000 (06:30 +0000)]
Enhance 'diagtool list-warnings' to report number of diagnostics covered directly under -Wpedantic, and enhance warning-flags.c test to test that this set does not grow.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159893 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRe-apply r159875 with fixes.
Ted Kremenek [Sat, 7 Jul 2012 05:53:30 +0000 (05:53 +0000)]
Re-apply r159875 with fixes.

- Split pedantic driver flag test into separate test file, and XFAIL on cygwin,mingw32
- Fix bug in tablegen logic where a missing '{' caused errors to be included in -Wpedantic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159892 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRevert rr159875, "Implement -Wpedantic and --no-pedantic to complement -Weverything...
NAKAMURA Takumi [Sat, 7 Jul 2012 02:48:02 +0000 (02:48 +0000)]
Revert rr159875, "Implement -Wpedantic and --no-pedantic to complement -Weverything." It broke several builds.

I suspect FileCheck might match assertion failure, even if clang/test/Misc/warning-flags.c passed the test.

> 0. Program arguments: bin/./clang -### -pedantic -Wpedantic clang/test/Driver/warning-options.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159886 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRestrict the set of declaration kinds for which we allow trailing comments.
Dmitri Gribenko [Fri, 6 Jul 2012 23:27:33 +0000 (23:27 +0000)]
Restrict the set of declaration kinds for which we allow trailing comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159878 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoImplement -Wpedantic and --no-pedantic to complement -Weverything.
Ted Kremenek [Fri, 6 Jul 2012 23:07:31 +0000 (23:07 +0000)]
Implement -Wpedantic and --no-pedantic to complement -Weverything.

This patch introduces some magic in tablegen to create a "Pedantic" diagnostic
group which automagically includes all warnings that are extensions.  This
allows a user to suppress specific warnings traditionally under -pedantic used
an ordinary warning flag.  This also allows users to use #pragma to silence
specific -pedantic warnings, or promote them to errors, within blocks of text
(just like any other warning).

-Wpedantic is NOT an alias for -pedantic.  Instead, it provides another way
to (a) activate -pedantic warnings and (b) disable them.  Where they differ
is that -pedantic changes the behavior of the preprocessor slightly, whereas
-Wpedantic does not (it just turns on the warnings).

The magic in the tablegen diagnostic emitter has to do with computing the minimal
set of diagnostic groups and diagnostics that should go into -Wpedantic, as those
diagnostics that already members of groups that themselves are (transitively) members
of -Wpedantic do not need to be included in the Pedantic group directly.  I went
back and forth on whether or not to magically generate this group, and the invariant
was that we always wanted extension warnings to be included in -Wpedantic "some how",
but the bookkeeping would be very onerous to manage by hand.

-no-pedantic (and --no-pedantic) is included for completeness, and matches many of the
same kind of flags the compiler already supports.  It does what it says: cancels out
-pedantic.  One discrepancy is that if one specifies --no-pedantic and -Weverything or
-Wpedantic the pedantic warnings are still enabled (essentially the -W flags win).  We
can debate the correct behavior here.

Along the way, this patch nukes some code in TextDiagnosticPrinter.cpp and CXStoredDiagnostic.cpp
that determine whether to include the "-pedantic" flag in the warning output.  This is
no longer needed, as all extensions now have a -W flag.

This patch also significantly reduces the number of warnings not under flags from 229
to 158 (all extension warnings).  That's a 31% reduction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159875 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[analyzer] Fix mis-committed test. No functionality change.
Jordan Rose [Fri, 6 Jul 2012 22:10:39 +0000 (22:10 +0000)]
[analyzer] Fix mis-committed test. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159869 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoConstify the argument to SourceLocation::getFromPtrEncoding.
Jordan Rose [Fri, 6 Jul 2012 22:00:04 +0000 (22:00 +0000)]
Constify the argument to SourceLocation::getFromPtrEncoding.

This allows SourceLocations to be stored in generic "data" fields
that are typed as "const void *" and are also used to point to
const objects.

Really we should probably be returning a const pointer from
getPtrEncoding as well, but in some places we want to store
SourceLocations in the same generic "data" field as proper
pointers to /mutable/ objects. Oh well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159868 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[analyzer] Add comments to Calls.h.
Jordan Rose [Fri, 6 Jul 2012 22:00:01 +0000 (22:00 +0000)]
[analyzer] Add comments to Calls.h.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159867 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[analyzer] Be careful about LazyCompoundVals, which may be for the first field.
Jordan Rose [Fri, 6 Jul 2012 21:59:56 +0000 (21:59 +0000)]
[analyzer] Be careful about LazyCompoundVals, which may be for the first field.

We use LazyCompoundVals to avoid copying the contents of structs and arrays
around in the store, and when we need to pass a struct around that already
has a LazyCompoundVal we just use the original one. However, it's possible
that the first field of a struct may have a LazyCompoundVal of its own, and
we currently can't distinguish a LazyCompoundVal for the first element of a
struct from a LazyCompoundVal for the entire struct. In this case we should
just drop the optimization and make a new LazyCompoundVal that encompasses
the old one.

PR13264 / <rdar://problem/11802440>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159866 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSprinkle llvm_unreachable around to placate GCC's -Wreturn-type.
Matt Beaumont-Gay [Fri, 6 Jul 2012 21:13:09 +0000 (21:13 +0000)]
Sprinkle llvm_unreachable around to placate GCC's -Wreturn-type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159860 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoobjc-arc: warn when assigning retained object to
Fariborz Jahanian [Fri, 6 Jul 2012 21:09:27 +0000 (21:09 +0000)]
objc-arc: warn when assigning retained object to
a 'weak' property just as we do the same for
'weak' variables. // rdar://11814185

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159859 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoobjective-c++11: extend c++11 range-based loop to iterate
Fariborz Jahanian [Fri, 6 Jul 2012 19:04:04 +0000 (19:04 +0000)]
objective-c++11: extend c++11 range-based loop to iterate
over objective-c container collection. // rdar://9293227

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159847 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDon't store pointers into a std::vector (RawCommentList::Comments). Although
Dmitri Gribenko [Fri, 6 Jul 2012 18:19:34 +0000 (18:19 +0000)]
Don't store pointers into a std::vector (RawCommentList::Comments).  Although
currently we take address of std::vector's contents only after we finished
adding all comments (so no reallocation can happen), this will change in
future.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159845 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoStop using new[] on llvm::BumpPtrAllocator.
Dmitri Gribenko [Fri, 6 Jul 2012 16:41:59 +0000 (16:41 +0000)]
Stop using new[] on llvm::BumpPtrAllocator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159833 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoUse C++ cast.
Dmitri Gribenko [Fri, 6 Jul 2012 15:40:08 +0000 (15:40 +0000)]
Use C++ cast.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159830 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove unreachable default case to pacify clang's -Wcovered-switch-default.
Benjamin Kramer [Fri, 6 Jul 2012 15:27:25 +0000 (15:27 +0000)]
Remove unreachable default case to pacify clang's -Wcovered-switch-default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159829 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoASTContext.cpp: Appease msvc to cast NULL to typed pointer, or msvc mistakes NULL...
NAKAMURA Takumi [Fri, 6 Jul 2012 11:51:12 +0000 (11:51 +0000)]
ASTContext.cpp: Appease msvc to cast NULL to typed pointer, or msvc mistakes NULL as int.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159818 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoclang/test/CodeGen/fp-contract.c: It requires ppc32!
NAKAMURA Takumi [Fri, 6 Jul 2012 11:11:27 +0000 (11:11 +0000)]
clang/test/CodeGen/fp-contract.c: It requires ppc32!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159816 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[cindex.py] Fix erroneous comment for CompileCommands
Arnaud A. de Grandmaison [Fri, 6 Jul 2012 08:22:05 +0000 (08:22 +0000)]
[cindex.py] Fix erroneous comment for CompileCommands

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159810 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAnother fix for the configure build: correct order of dependencies.
Manuel Klimek [Fri, 6 Jul 2012 08:13:45 +0000 (08:13 +0000)]
Another fix for the configure build: correct order of dependencies.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159809 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoBuild-fix: Remove non-existent directories from Makefiles.
Manuel Klimek [Fri, 6 Jul 2012 06:00:30 +0000 (06:00 +0000)]
Build-fix: Remove non-existent directories from Makefiles.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159807 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdds the AST Matcher library, which provides a in-C++ DSL to express
Manuel Klimek [Fri, 6 Jul 2012 05:48:52 +0000 (05:48 +0000)]
Adds the AST Matcher library, which provides a in-C++ DSL to express
matches on interesting parts of the AST, and callback mechanisms to
act on them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159805 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoCommentParser.cpp: remove unused variable.
Dmitri Gribenko [Fri, 6 Jul 2012 01:14:58 +0000 (01:14 +0000)]
CommentParser.cpp: remove unused variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159797 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoForgot to rename one use of FPContractModeTy
Lang Hames [Fri, 6 Jul 2012 01:10:46 +0000 (01:10 +0000)]
Forgot to rename one use of FPContractModeTy

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159796 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd -ffp-contract = { fast | on | off } command line option support.
Lang Hames [Fri, 6 Jul 2012 00:59:19 +0000 (00:59 +0000)]
Add -ffp-contract = { fast | on | off }   command line option support.

This flag sets the 'fp-contract' mode, which controls the formation of fused
floating point operations. Available modes are:

- Fast: Form fused operations anywhere.
- On: Form fused operations where allowed by FP_CONTRACT. This is the default
      mode.
- Off: Don't form fused operations (in future this may be relaxed to forming
       fused operations where it can be proved that the result won't be
       affected).

Currently clang doesn't support the FP_CONTRACT pragma, so the 'On' and 'Off'
modes are equivalent.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159794 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoComment.h: correct identation
Dmitri Gribenko [Fri, 6 Jul 2012 00:45:54 +0000 (00:45 +0000)]
Comment.h: correct identation

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159793 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdded a new memberfor Parser, to be used soon
Fariborz Jahanian [Fri, 6 Jul 2012 00:42:20 +0000 (00:42 +0000)]
Added a new memberfor Parser, to be used soon
for doing delayed parsing of c++ method defined in
objc class implementations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159792 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoImplement AST classes for comments, a real parser for Doxygen comments and a
Dmitri Gribenko [Fri, 6 Jul 2012 00:28:32 +0000 (00:28 +0000)]
Implement AST classes for comments, a real parser for Doxygen comments and a
very simple semantic analysis that just builds the AST; minor changes for lexer
to pick up source locations I didn't think about before.

Comments AST is modelled along the ideas of HTML AST: block and inline content.

* Block content is a paragraph or a command that has a paragraph as an argument
  or verbatim command.
* Inline content is placed within some block.  Inline content includes plain
  text, inline commands and HTML as tag soup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159790 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[objcmt] Check for classes that accept 'objectForKey:' (or the other selectors
Argyrios Kyrtzidis [Fri, 6 Jul 2012 00:07:09 +0000 (00:07 +0000)]
[objcmt] Check for classes that accept 'objectForKey:' (or the other selectors
that the migrator handles) but return their instances as 'id', resulting
in the compiler resolving 'objectForKey:' as the method from NSDictionary.

When checking if we can convert to subscripting syntax, check whether
the receiver is a result of a class method from a hardcoded list of
such classes. In such a case return the specific class as the interface
of the receiver.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159788 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoobjective-c: don't involve properties when checking
Fariborz Jahanian [Thu, 5 Jul 2012 22:26:07 +0000 (22:26 +0000)]
objective-c: don't involve properties when checking
under -Wsuper-class-method-mismatch for method
mismatches in current and suprt class.
// rdar://11793793

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159784 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[objcmt] Allow migrating to subscripting syntax for other classes
Argyrios Kyrtzidis [Thu, 5 Jul 2012 21:49:51 +0000 (21:49 +0000)]
[objcmt] Allow migrating to subscripting syntax for other classes
(apart from NSDictionary/NSArray) that implement objectForKey:/objectAtIndex/etc.
and the subscripting methods as well.

Part of rdar://11734969

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159783 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoThread-safety analysis: eliminate false positives in case where the definition
DeLesley Hutchins [Thu, 5 Jul 2012 21:16:29 +0000 (21:16 +0000)]
Thread-safety analysis: eliminate false positives in case where the definition
duplicates attributes on the declaration.  Also eliminates a false negative in
ReleasableMutexLock.  Fixing this bug required some refactoring.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159780 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[analyzer] Add a statistic for maximum CFG size and a script to summarize analyzer...
Anna Zaks [Thu, 5 Jul 2012 20:44:02 +0000 (20:44 +0000)]
[analyzer] Add a statistic for maximum CFG size and a script to summarize analyzer stats from scan-build output.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159776 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMIPS: Define __mips_dsp_rev / __mips_dspr2 / __mips_dsp macros
Simon Atanasyan [Thu, 5 Jul 2012 20:16:22 +0000 (20:16 +0000)]
MIPS: Define __mips_dsp_rev / __mips_dspr2 /  __mips_dsp macros
if -mdsp or -mdspr2 options are provided.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159774 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoobjective-c++ parsing. Turn off delayed parsing
Fariborz Jahanian [Thu, 5 Jul 2012 19:34:20 +0000 (19:34 +0000)]
objective-c++ parsing. Turn off delayed parsing
of out-of-line c++ method definition which happens
to be inside an objc class implementation
until I can figure out how to do it. This is to fix
a broken project.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159772 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMIPS: Add -mdsp/-mno-dsp and -mdspr2/-mno-dspr2 command line options support.
Simon Atanasyan [Thu, 5 Jul 2012 19:23:00 +0000 (19:23 +0000)]
MIPS: Add -mdsp/-mno-dsp and -mdspr2/-mno-dspr2 command line options support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159769 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMIPS: Factor out the code converting command line options to target features.
Simon Atanasyan [Thu, 5 Jul 2012 18:51:43 +0000 (18:51 +0000)]
MIPS: Factor out the code converting command line options to target features.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159767 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRelease notes for r158230 "Disallow using ObjC literals in direct comparisons"
Jordan Rose [Thu, 5 Jul 2012 18:48:30 +0000 (18:48 +0000)]
Release notes for r158230 "Disallow using ObjC literals in direct comparisons"

This may turn out to be a controversial change, due to string literals being
uniqued at link time, but Apple's docs only say "The compiler makes such
object constants unique on a per-module basis..."[1] without actually saying
what a "module" is. (It's not a clang module.) Furthermore, this uniqueness
guarantee often can't be guaranteed once the string has been passed through
framework code.

If this does turn out very controversial, we could downgrade this to a
DefaultError warning for strings, and leave it as a true Error for other
kinds of literals.

(<rdar://problem/11300873>)

[1]: https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Strings/Articles/CreatingStrings.html

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159766 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdapts the FrontendAction convenience functions so that it can be
Manuel Klimek [Thu, 5 Jul 2012 18:13:01 +0000 (18:13 +0000)]
Adapts the FrontendAction convenience functions so that it can be
used with classes that generate ASTConsumers; this allows decoupling
the ASTConsumer generation from the Frontend library (like, for example,
the MatchFinder in the upcoming ASTMatcher patch).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159760 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMIPS: Define __mips16 macro if -mips16 option is provided.
Simon Atanasyan [Thu, 5 Jul 2012 16:06:06 +0000 (16:06 +0000)]
MIPS: Define __mips16 macro if -mips16 option is provided.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159753 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMIPS: Replace the pair of boolean flags by enumeration to hold selected float ABI.
Simon Atanasyan [Thu, 5 Jul 2012 15:32:46 +0000 (15:32 +0000)]
MIPS: Replace the pair of boolean flags by enumeration to hold selected float ABI.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159752 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMIPS: Add -mips16 / -mno-mips16 command line support.
Simon Atanasyan [Thu, 5 Jul 2012 14:19:39 +0000 (14:19 +0000)]
MIPS: Add -mips16 / -mno-mips16 command line support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159747 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoGive test check tags consistent names.
Simon Atanasyan [Thu, 5 Jul 2012 11:30:19 +0000 (11:30 +0000)]
Give test check tags consistent names.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159744 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoPR13273: When performing list-initialization with an empty initializer list,
Richard Smith [Thu, 5 Jul 2012 08:39:21 +0000 (08:39 +0000)]
PR13273: When performing list-initialization with an empty initializer list,
actually perform value initialization rather than trying to fake it with a call
to the default constructor. Fixes various bugs related to the previously-missing
zero-initialization in this case.

I've also moved this and the other list initialization 'special case' from
TryConstructorInitialization into TryListInitialization where they belong.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159733 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix some memory leaks found by the static analyzer. Thanks to John Smith for running...
Richard Smith [Thu, 5 Jul 2012 08:20:49 +0000 (08:20 +0000)]
Fix some memory leaks found by the static analyzer. Thanks to John Smith for running it over Clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159732 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoUpdate unittests for include change.
Benjamin Kramer [Wed, 4 Jul 2012 20:33:53 +0000 (20:33 +0000)]
Update unittests for include change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159724 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDrop the ASTContext.h include from DeclFriend.h and DeclTemplate.h.
Benjamin Kramer [Wed, 4 Jul 2012 20:19:54 +0000 (20:19 +0000)]
Drop the ASTContext.h include from DeclFriend.h and DeclTemplate.h.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159723 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove get(V)BaseClassOffsetInBits, the CharUnit functions should be used instead.
Benjamin Kramer [Wed, 4 Jul 2012 18:45:14 +0000 (18:45 +0000)]
Remove get(V)BaseClassOffsetInBits, the CharUnit functions should be used instead.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159719 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDrop the ASTContext.h include from Stmt.h and fix up transitive users.
Benjamin Kramer [Wed, 4 Jul 2012 17:04:04 +0000 (17:04 +0000)]
Drop the ASTContext.h include from Stmt.h and fix up transitive users.

This required moving the ctors for IntegerLiteral and FloatingLiteral out of
line which shouldn't change anything as they are usually called through Create
methods that are already out of line.

ASTContext::Deallocate has been a nop for a long time, drop it from ASTVector
and make it independent from ASTContext.h

Pass the StorageAllocator directly to AccessedEntity so it doesn't need to
have a definition of ASTContext around.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159718 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSplit out the "empty" case for compound statement into a separate ctor.
Benjamin Kramer [Wed, 4 Jul 2012 17:03:41 +0000 (17:03 +0000)]
Split out the "empty" case for compound statement into a separate ctor.

Move the ASTContext-dependent version out of line.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159717 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoCXXRecordDecl: Split getBases/getVBases into a slow and a fast path.
Benjamin Kramer [Wed, 4 Jul 2012 17:03:33 +0000 (17:03 +0000)]
CXXRecordDecl: Split getBases/getVBases into a slow and a fast path.

This avoids costly computation of getASTContext() and drops the header
dependency from DeclCXX.h to ASTContext.h.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159716 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoHoist the logic for selecting the Objective-C dispatch method into the runtime
David Chisnall [Wed, 4 Jul 2012 11:52:24 +0000 (11:52 +0000)]
Hoist the logic for selecting the Objective-C dispatch method into the runtime
class, from the target.  No functionality change, just less duplicated logic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159710 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoA few more cleanups for the GNU family of ObjC runtimes.
David Chisnall [Wed, 4 Jul 2012 10:37:03 +0000 (10:37 +0000)]
A few more cleanups for the GNU family of ObjC runtimes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159708 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRenamed RawComment kinds to avoid name clash.
Abramo Bagnara [Wed, 4 Jul 2012 07:30:26 +0000 (07:30 +0000)]
Renamed RawComment kinds to avoid name clash.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159706 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMove a comment from the commit message into the code.
Bob Wilson [Wed, 4 Jul 2012 00:18:41 +0000 (00:18 +0000)]
Move a comment from the commit message into the code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159696 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoObj-C++11 parser: handle a fall out of delayed
Fariborz Jahanian [Tue, 3 Jul 2012 23:22:13 +0000 (23:22 +0000)]
Obj-C++11 parser: handle a fall out of delayed
c-function parsing when a declaration with
C++0x braced-init-list is inside an @implementation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159693 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[analyzer] For now, don't inline non-static member overloaded operators.
Jordan Rose [Tue, 3 Jul 2012 22:55:57 +0000 (22:55 +0000)]
[analyzer] For now, don't inline non-static member overloaded operators.

Our current inlining support (specifically RegionStore::enterStackFrame)
doesn't know that calls to overloaded operators may be calls to non-static
member functions, and that in these cases the first argument should be
treated as 'this'. This caused incorrect results and sometimes crashes.

The long-term fix will be to rewrite RegionStore::enterStackFrame to use
CallEvent and its subclasses, but for now we can just disable these
problematic calls by classifying them under a new CallEvent,
CXXMemberOperatorCall.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159692 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoObj-C++11 parser: fix broken parsing of c-function
Fariborz Jahanian [Tue, 3 Jul 2012 22:54:28 +0000 (22:54 +0000)]
Obj-C++11 parser: fix broken parsing of c-function
defined in class implementations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159691 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoObj-C++11 parser: turn off buffering of
Fariborz Jahanian [Tue, 3 Jul 2012 22:29:23 +0000 (22:29 +0000)]
Obj-C++11 parser: turn off buffering of
c-function defined in objc class
implementation for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159690 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoobjective-c: Refactor parse/sema portion of
Fariborz Jahanian [Tue, 3 Jul 2012 22:00:52 +0000 (22:00 +0000)]
objective-c: Refactor parse/sema portion of
objective-c's fast enumeration statement,
for more work to come.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159689 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRename the GCC Objective-C runtime to gcc from gnu-fragile and the GNUstep
David Chisnall [Tue, 3 Jul 2012 20:49:52 +0000 (20:49 +0000)]
Rename the GCC Objective-C runtime to gcc from gnu-fragile and the GNUstep
runtime to gnustep from gnu.  Fix EH for the GCC runtime.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159684 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoWhen using -pg targeting OS X 10.8, pass -no_new_main to the linker.
Bob Wilson [Tue, 3 Jul 2012 20:42:10 +0000 (20:42 +0000)]
When using -pg targeting OS X 10.8, pass -no_new_main to the linker.

By default on OS X 10.8, we don't link with a crt1.o file and the linker
knows to use _main as the entry point.  But, when compiling with -pg, we
need to link with the gcrt1.o file, and the linker needs to be told to use
the "start" symbol as the entry point.  The -no_new_main linker option does
that last part.  <rdar://problem/11491405>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159683 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[libclang] CompilationDatabase naming and comment fixes
Arnaud A. de Grandmaison [Tue, 3 Jul 2012 20:38:12 +0000 (20:38 +0000)]
[libclang] CompilationDatabase naming and comment fixes

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159682 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoCommentLexer: remove Markdown tokens from the token list (they are not emitted by...
Dmitri Gribenko [Tue, 3 Jul 2012 20:21:49 +0000 (20:21 +0000)]
CommentLexer: remove Markdown tokens from the token list (they are not emitted by lexer).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159681 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoThread safety analysis: improve handling of smart pointers.
DeLesley Hutchins [Tue, 3 Jul 2012 19:47:18 +0000 (19:47 +0000)]
Thread safety analysis: improve handling of smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159679 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMake the following changes in the way Mips handles vector arguments and return
Akira Hatanaka [Tue, 3 Jul 2012 19:24:06 +0000 (19:24 +0000)]
Make the following changes in the way Mips handles vector arguments and return
values:

- Return integer vectors in integer registers.
- Pass vector arguments in integer registers.
- Set an upper bound for argument alignment. The largest alignment is 8-byte
  for O32 and 16-byte for N32/64.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159676 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoThread Safety Analysis: handle expressions involving temporaries,
DeLesley Hutchins [Tue, 3 Jul 2012 18:25:56 +0000 (18:25 +0000)]
Thread Safety Analysis: handle expressions involving temporaries,
e.g. ExprWithCleanups.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159674 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoCommentBriefParser: remove dead store. Found by Clang Analyzer.
Dmitri Gribenko [Tue, 3 Jul 2012 18:10:20 +0000 (18:10 +0000)]
CommentBriefParser: remove dead store.  Found by Clang Analyzer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159673 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd additional architecture defines for PPC targets.
Hal Finkel [Tue, 3 Jul 2012 16:51:04 +0000 (16:51 +0000)]
Add additional architecture defines for PPC targets.

Patch by Andy Gibbs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159665 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[libclang] Protect against a race condition where a thread
Argyrios Kyrtzidis [Tue, 3 Jul 2012 16:30:52 +0000 (16:30 +0000)]
[libclang] Protect against a race condition where a thread
may be destroying an ASTUnit while cleanupOnDiskMapAtExit is
getting called.

rdar://11781241

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159664 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoclang/utils/TableGen/ClangAttrEmitter.cpp: Fix abuse of StringRef (from getValueAsStr...
NAKAMURA Takumi [Tue, 3 Jul 2012 14:45:09 +0000 (14:45 +0000)]
clang/utils/TableGen/ClangAttrEmitter.cpp: Fix abuse of StringRef (from getValueAsString()).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159662 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSilence warning in -Asserts build
Matt Beaumont-Gay [Tue, 3 Jul 2012 03:55:58 +0000 (03:55 +0000)]
Silence warning in -Asserts build

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159635 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoShare ConvertUTF8toWide() between Lex and CodeGen.
Nico Weber [Tue, 3 Jul 2012 02:24:52 +0000 (02:24 +0000)]
Share ConvertUTF8toWide() between Lex and CodeGen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159634 91177308-0d34-0410-b5e6-96231b3b80d8