- Jan 20, 2018
-
-
Volodymyr Sapsai authored
This fixes PR32732 by updating CurLexerKind to reflect available lexers. We were hitting null pointer in Preprocessor::Lex because CurLexerKind was CLK_Lexer but CurLexer was null. And we set it to null in Preprocessor::HandleEndOfFile when exiting a file with code completion point. To reproduce the crash it is important for a comment to be inside a class specifier. In this case in Parser::ParseClassSpecifier we improve error recovery by pushing a semicolon token back into the preprocessor and later on try to lex a token because we haven't reached the end of file. Also clang crashes only on code completion in included file, i.e. when IncludeMacroStack is not empty. Though we reset CurLexer even if include stack is empty. The difference is that during pushing back a semicolon token, preprocessor calls EnterCachingLexMode which decides it is already in caching mode because various lexers are null and IncludeMacroStack is not empty. As the result, CurLexerKind remains CLK_Lexer instead of updating to CLK_CachingLexer. rdar://problem/34787685 Reviewers: akyrtzi, doug.gregor, arphaman Reviewed By: arphaman Subscribers: cfe-commits, kfunk, arphaman, nemanjai, kbarton Differential Revision: https://reviews.llvm.org/D41688 llvm-svn: 323008
-
Adrian Prantl authored
in TestBase::getBuildArtifact(). This NFC commit is in preparation for https://reviews.llvm.org/D42281 (compile the LLDB tests out-of-tree). Differential Revision: https://reviews.llvm.org/D42280 llvm-svn: 323007
-
Abderrazek Zaafrani authored
https://reviews.llvm.org/D41792 llvm-svn: 323006
-
Abderrazek Zaafrani authored
https://reviews.llvm.org/D41792 llvm-svn: 323005
-
- Jan 19, 2018
-
-
Rui Ueyama authored
llvm-svn: 323004
-
Sanjay Patel authored
llvm-svn: 323003
-
Kostya Kortchinsky authored
Summary: Fuchsia has `getauxval` (https://fuchsia.googlesource.com/zircon/+/master/third_party/ulib/musl/include/sys/auxv.h, https://fuchsia.googlesource.com/zircon/+/master/third_party/ulib/musl/src/misc/getauxval.c) so set SANITIZER_USE_GETAUXVAL to 1 for this platform. Reviewers: alekseyshl, flowerhack Reviewed By: flowerhack Subscribers: srhines, kubamracek, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D42315 llvm-svn: 323002
-
Lang Hames authored
ExternalSymbolMap now stores the string key (rather than using a StringRef), as the object file backing the key may be removed at any time. llvm-svn: 323001
-
Sam McCall authored
Global scope is "" (was "") Top-level namespace scope is "ns::" (was "ns") Nested namespace scope is "ns::ns::" (was "ns::ns") This composes more naturally: - qname = scope + name - full scope = resolved scope + unresolved scope (D42073 was the trigger) It removes a wart from the old way: "foo::" has one more separator than "". Another alternative that has these properties is "::ns", but that lacks the property that both the scope and the name are substrings of the qname as produced by clang. This is re-landing r322996 which didn't build. llvm-svn: 323000
-
Kostya Kortchinsky authored
Summary: We somehow never did it, and it raised no issue until now, when trying to enable Fuchsia as a supported Scudo platform in the cmake config. So propagate SANITIZER_COMMON_LINK_FLAGS for now. Reviewers: alekseyshl, flowerhack Reviewed By: flowerhack Subscribers: mgorny, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D42314 llvm-svn: 322999
-
Sam McCall authored
This reverts commit r322996. llvm-svn: 322998
-
Craig Topper authored
llvm-svn: 322997
-
Sam McCall authored
Global scope is "" (was "") Top-level namespace scope is "ns::" (was "ns") Nested namespace scope is "ns::ns::" (was "ns::ns") This composes more naturally: - qname = scope + name - full scope = resolved scope + unresolved scope (D42073 was the trigger) It removes a wart from the old way: "foo::" has one more separator than "". Another alternative that has these properties is "::ns", but that lacks the property that both the scope and the name are substrings of the qname as produced by clang. llvm-svn: 322996
-
Aaron Smith authored
[SymbolFilePDB] Fix null array access when parsing the type of a function without any arguments, i.e. 'int main()' and add support to test it Summary: - Fix a null array access bug. This happens when creating the lldb type for a function that has no argument. - Implement SymbolFilePDB::ParseTypes method. Using `lldb-test symbols` will show all supported types in the target. - Create lldb types for variadic function, PDBSymbolTypePointer, PDBSymbolTypeBuiltin - The underlying builtin type for PDBSymbolTypeEnum is always `Int`, correct it with the very first enumerator's encoding if any. This is more accurate when the underlying type is not signed or another integer type. - Fix a bug when the compiler type is not created based on PDB_BuiltinType. For example, basic type `long` is of same width as `int` in a 32-bit target, and the compiler type of former one will be represented by the one generated for latter if using the default method. Introduce a static function GetBuiltinTypeForPDBEncodingAndBitSize to correct this issue. - Basic type `long double` and `double` have the same bit size in MSVC and there is no information in a PDB to distinguish them. The compiler type of the former one is represented by the latter's. - There is no line informaton about typedef, enum etc in a PDB and the source and line information for them are not shown. - There is no information about scoped enumeration. The compiler type is represented as an unscoped one. Reviewers: zturner, lldb-commits, davide, asmith Reviewed By: zturner, asmith Subscribers: llvm-commits, davide Differential Revision: https://reviews.llvm.org/D41427 llvm-svn: 322995
-
Sam Clegg authored
Only effects --emit-relocs/--relocatable Patch by Nicholas Wilson! Differential Revision: https://reviews.llvm.org/D42306 llvm-svn: 322994
-
Jakub Kuderski authored
Summary: This patch attempts to fix the DomTree incremental insertion bug found here [[ https://bugs.llvm.org/show_bug.cgi?id=35969 | PR35969 ]] . When performing an insertion into a piece of unreachable CFG, we may find the same not at different levels. When this happens, the node can turn out to be affected when we find it starting from a node with a lower level in the tree. The level at which we start visitation affects if we consider a node affected or not. This patch tracks the lowest level at which each node was visited during insertion and allows it to be visited multiple times, if it can cause it to be considered affected. Reviewers: brzycki, davide, dberlin, grosser Reviewed By: brzycki Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D42231 llvm-svn: 322993
-
Jessica Paquette authored
Previously, the DIBuilder didn't expose functionality to set its compile unit in any other way than calling createCompileUnit. This meant that the outliner, which creates new functions, had to create a new compile unit for its debug info. This commit adds an optional parameter in the DIBuilder's constructor which lets you set its CU at construction. It also changes the MachineOutliner so that it keeps track of the DISubprograms for each outlined sequence. If debugging information is requested, then it uses one of the outlined sequence's DISubprograms to grab a CU. It then uses that CU to construct the DISubprogram for the new outlined function. The test has also been updated to reflect this change. See https://reviews.llvm.org/D42254 for more information. Also see the e-mail discussion on D42254 in llvm-commits for more context. llvm-svn: 322992
-
Petr Hosek authored
It was always intended to be. Patch By: mcgrathr Differential Revision: https://reviews.llvm.org/D41513 llvm-svn: 322991
-
Sam Clegg authored
We need these import since relocations are generated against them. Patch by Nicholas Wilson! Differential Revision: https://reviews.llvm.org/D42305 llvm-svn: 322990
-
Ulrich Weigand authored
On current machines we have load-on-condition instructions that can be used to directly implement the SETCC semantics. If we have those, it is always preferable to use them instead of generating the IPM sequence. llvm-svn: 322989
-
Ulrich Weigand authored
In order to implement a test whether a compare-and-swap succeeded, the SystemZ back-end currently emits a rather inefficient sequence of first converting the CC result into an integer, and then testing that integer against zero. This commit changes the back-end to simply directly test the CC value set by the compare-and-swap instruction. llvm-svn: 322988
-
Ulrich Weigand authored
The SystemZ back-end uses a sequence of IPM followed by arithmetic operations to implement the SETCC primitive. This is currently done early during SelectionDAG. This patch moves generating those sequences to much later in SelectionDAG (during PreprocessISelDAG). This doesn't change much in generated code by itself, but it allows further enhancements that will be checked-in as follow-on commits. llvm-svn: 322987
-
Ulrich Weigand authored
This provides a computeKnownBits implementation for SystemZ target nodes. Currently only SystemZISD::SELECT_CCMASK is supported. llvm-svn: 322986
-
Ulrich Weigand authored
The second return value of ATOMIC_CMP_SWAP_WITH_SUCCESS is known to be a boolean, and should therefore be treated by computeKnownBits just like the second return values of SMULO / UMULO. Differential Revision: https://reviews.llvm.org/D42067 llvm-svn: 322985
-
Richard Trieu authored
Using a BlockDecl in a default member initializer causes it to be attached to CXXMethodDecl without its access specifier being set. This prevents a crash where getAccess is called on this BlockDecl, since that method expects any Decl in CXXRecord scope to have an access specifier. llvm-svn: 322984
-
Ulrich Weigand authored
This avoids excessive test run times e.g. with expensive checks enabled. llvm-svn: 322983
-
Craig Topper authored
llvm-svn: 322982
-
Jan Vesely authored
Passes piglit on turks and carrizo. Passes CTS on carrizo. Acked-By:
Aaron Watry <awatry@gmail.com> Tested-By:
Aaron Watry <awatry@gmail.com> Signed-off-by:
Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 322980
-
Jan Vesely authored
v2: fixup constant precision Passes piglit on turks and carrizo. Passes CTS on carrizo Fixes half_tan to pass CTS on carrizo Acked-By:
Aaron Watry <awatry@gmail.com> Tested-By:
Aaron Watry <awatry@gmail.com> Signed-off-by:
Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 322979
-
Sam Clegg authored
Summary: For consistency with the output of lld. This is useful in runnable binaries as can them be sure the null function pointer will never be a valid argument call_indirect. Subscribers: jfb, dschuff, jgravelle-google, aheejin, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D42284 llvm-svn: 322978
-
Don Hinton authored
Summary: When setting CMAKE_ASM_COMPILER=clang, we also need to set CMAKE_ASM_COMPILER_ID=Clang. This is needed because cmake won't set CMAKE_ASM_COMPILER_ID if CMAKE_ASM_COMPILER is already set. Without CMAKE_ASM_COMPILER_ID, cmake can't set CMAKE_ASM_COMPILER_OPTIONS_TARGET either, which means CMAKE_ASM_COMPILER_TARGET is ignored, causing cross compiling to fail, i.e., `--target=${CMAKE_ASM_COMPILER_TARGET}` isn't passed. Differential Revision: https://reviews.llvm.org/D42232 llvm-svn: 322977
-
Sam Clegg authored
Summary: This change enables D42284 to land without breaking lld Subscribers: jfb, dschuff, jgravelle-google, aheejin, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D42285 llvm-svn: 322976
-
Marshall Clow authored
More P0202 constexpr-ifying in <algorithm>. This commit handles replace/replace_if/replace_copy/replace_copy_if. llvm-svn: 322975
-
Simon Pilgrim authored
Check codegen without PEXTRD llvm-svn: 322974
-
Michal Gorny authored
Include the LLVM_LIBXML2_ENABLED cache variable in LLVMConfig.cmake in order to make it available for other LLVM packages to query. This is necessary to fix stand-alone testing of LLD. Differential Revision: https://reviews.llvm.org/D42252 llvm-svn: 322973
-
Joel Galenson authored
Fix a performance regression caused by r322737. While trying to make it easier to replace compares with existing adds and subtracts, I accidentally stopped it from doing so in some cases. This should fix that. I'm also fixing another potential bug in that commit. Differential Revision: https://reviews.llvm.org/D42263 llvm-svn: 322972
-
Derek Schuff authored
RuntimeLibcallSignatures previously manually initialized all the libcall names into an array and searched it linearly for the first match to lookup the corresponding index. r322802 switched that to initializing a map keyed by the libcall name. Neither of these approaches works correctly because some libcall numbers use the same name on different platforms (e.g. the "l" suffixed functions use f80 or f128 or ppcf128). This change fixes that by ensuring that each name only goes into the map once. It also adds tests. Differential Revision: https://reviews.llvm.org/D42271 llvm-svn: 322971
-
Marshall Clow authored
llvm-svn: 322970
-
Daniel Neilson authored
llvm-svn: 322969
-
Daniel Neilson authored
llvm-svn: 322968
-