Skip to content
  1. Apr 09, 2019
    • Amy Huang's avatar
      Revert "[MS] Add metadata for __declspec(allocator)" · 8a96fa23
      Amy Huang authored
      This reverts commit e7bd735b.
      Reverting because of buildbot failure.
      
      llvm-svn: 357952
      8a96fa23
    • Dan Liew's avatar
      [asan_symbolize] Use proper logging infrastructure. · 836da99a
      Dan Liew authored
      Summary:
      The previous logging infrastructure had several problems:
      
      * Debugging output was emitted to standard output which is also where
        the symbolized output would go. Interleaving these two separate
        bits of information makes inspecting the output difficult and could
        potentially break tests.
      
      * Enabling debugging output requires modifying the script which is
        not very conveninent.
      
      * When debugging it isn't immediately obvious where the output is
        coming from.
      
      This patch uses the Python standard library logging infrastructure
      which fixes all of the above problems. Logging is controlled using
      two new options.
      
      * `--log-level` - Sets the logging level, default is
      `info`.
      * `--log-dest` - Set the logging destination, default
      is standard error.
      
      Some simple test cases for the feature are included.
      
      rdar://problem/49476995
      
      Reviewers: kubamracek, yln, samsonov, dvyukov, vitalybuka
      
      Subscribers: #sanitizers, llvm-commits
      
      Tags: #llvm, #sanitizers
      
      Differential Revision: https://reviews.llvm.org/D60343
      
      llvm-svn: 357951
      836da99a
    • Lang Hames's avatar
      [RuntimeDyld] Fix an ambiguous make_unique call. · d250238a
      Lang Hames authored
      llvm-svn: 357950
      d250238a
    • Eric Fiselier's avatar
      Remove unneeded write in __cxa_guard_release. · b32c8473
      Eric Fiselier authored
      The INIT_COMPLETE write now writes to the entire guard object
      instead of just one byte.
      
      llvm-svn: 357949
      b32c8473
  2. Apr 08, 2019
    • Adrian Prantl's avatar
      Fix a stack buffer overflow found by ASAN. · 1a0c0ffa
      Adrian Prantl authored
      llvm::StringRef host_and_port is not guaranteed to be null-terminated.
      Generally, it is not safe at all to convert a StringRef into a char *
      by calling data() on it.
      
      <rdar://problem/49698580>
      
      llvm-svn: 357948
      1a0c0ffa
    • Lang Hames's avatar
      [RuntimeDyld] Decouple RuntimeDyldChecker from RuntimeDyld. · 941f247d
      Lang Hames authored
      This will allow RuntimeDyldChecker (and rtdyld-check tests) to test a new JIT
      linker: JITLink (https://reviews.llvm.org/D58704).
      
      llvm-svn: 357947
      941f247d
    • Louis Dionne's avatar
      [libc++] Remove install_name and compatibility_version on OS X · fecbf591
      Louis Dionne authored
      CMake already specifies those, and we never actually want those to be
      used. In fact, r357811 re-ordered those flags in a way that the
      explicitly-provided install_name was overriding the CMake-provided
      install_name (instead of the other way around). This caused the dylib
      to be considered a system dylib, and hence the explicitly provided rpath
      to be ignored. This, in turn, caused some unit tests to start linking
      against the system libc++.dylib instead of the freshly-built one.
      Specifically, the unit tests that started linking against the system
      dylib are those that didn't specify a DYLD_LIBRARY_PATH, such as
      last_write_time.sh.cpp.
      
      llvm-svn: 357946
      fecbf591
    • Shoaib Meenai's avatar
      [BinaryFormat] Update Mach-O ARM64E CPU subtype and dumping · 867131a9
      Shoaib Meenai authored
      The new value is taken from <mach/machine.h> in the MacOSX10.14 SDK from
      Xcode 10.1. Update llvm-objdump and llvm-readobj accordingly.
      
      Differential Revision: https://reviews.llvm.org/D58636
      
      llvm-svn: 357945
      867131a9
    • Eric Fiselier's avatar
      Make reads and writes of the guard variable atomic. · 62c2b5ac
      Eric Fiselier authored
      The read of the guard variable by the caller is atomic,
      and doesn't happen under a mutex.
      
      Our internal reads and writes were non-atomic, because they happened
      under a mutex.
      
      The writes should always be atomic since they can be observed outside
      of the lock.
      
      Making the reads atomic is not strictly necessary under the current
      global mutex approach, but will be under implementations that use a
      futex (which I plan to land shortly). However, they should add little
      additional cost.
      
      llvm-svn: 357944
      62c2b5ac
    • Sanjay Patel's avatar
      [InstCombine] peek through fdiv to find a squared sqrt · 773e04c8
      Sanjay Patel authored
      A more general canonicalization between fdiv and fmul would not
      handle this case because that would have to be limited by uses
      to prevent 2 values from becoming 3 values:
      (x/y) * (x/y) --> (x*x) / (y*y)
      
      (But we probably should still have that limited -- but more general --
      canonicalization independently of this change.)
      
      llvm-svn: 357943
      773e04c8
    • Simon Pilgrim's avatar
      [TargetLowering] SimplifyDemandedBits - use DemandedElts in bitcast handling · 9f74df7d
      Simon Pilgrim authored
      Be more selective in the SimplifyDemandedBits -> SimplifyDemandedVectorElts bitcast call based on the demanded elts.
      
      llvm-svn: 357942
      9f74df7d
    • Chandler Carruth's avatar
      Move the builtin headers to use the new license file header. · 4cf5743b
      Chandler Carruth authored
      Summary:
      These all had somewhat custom file headers with different text from the
      ones I searched for previously, and so I missed them. Thanks to Hal and
      Kristina and others who prompted me to fix this, and sorry it took so
      long.
      
      Reviewers: hfinkel
      
      Subscribers: mcrosier, javed.absar, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D60406
      
      llvm-svn: 357941
      4cf5743b
    • Shafik Yaghmour's avatar
      [ASTImporter] Call to HandleNameConflict in VisitEnumDecl mistakeningly using... · d4263123
      Shafik Yaghmour authored
      [ASTImporter] Call to HandleNameConflict in VisitEnumDecl mistakeningly using Name instead of SearchName
      
      Summary:
      https://reviews.llvm.org/D51633 added error handling to the ASTNodeImporter::VisitEnumDecl(...) for the conflicting names case. This could lead to erroneous return of an error in that case since we should have been using SearchName. Name may be empty in the case where we find the name via getTypedefNameForAnonDecl(...).
      
      Differential Revision: https://reviews.llvm.org/D59665
      
      llvm-svn: 357940
      d4263123
    • Sanjay Patel's avatar
      [InstCombine] add extra-use tests for fmul+sqrt; NFC · bf1417d7
      Sanjay Patel authored
      llvm-svn: 357939
      bf1417d7
    • Nikita Popov's avatar
      [InstCombine] Add more tests for signed saturing math overflow; NFC · 15abd74d
      Nikita Popov authored
      Overflow conditions for sadd.sat and ssub.sat which can be determined
      based on constant ranges, but not necessarily known bits.
      
      llvm-svn: 357938
      15abd74d
    • David Goldman's avatar
      Clean up ObjCPropertyDecl printing · fa8185c5
      David Goldman authored
      Summary:
      - `@property(attr, attr2)` instead of `@property ( attr,attr2 )`.
      - Change priority of attributes (see code/comments inline).
      - Support for printing weak and unsafe_unretained attributes.
      
      Subscribers: arphaman, jfb, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D57965
      
      llvm-svn: 357937
      fa8185c5
    • Nico Weber's avatar
      llvm-undname: Fix more crashes and asserts on invalid inputs · 63b97d2a
      Nico Weber authored
      For functions whose callers don't check that enough input is present,
      add checks at the start of the function that enough input is there and
      set Error otherwise.
      
      For functions that return AST objects, return nullptr instead of
      incomplete AST objects with nullptr fields if an error occurred during
      the function.
      
      Introduce a new function demangleDeclarator() for the sequence
      demangleFullyQualifiedSymbolName(); demangleEncodedSymbol() and
      use it in the two places that had this sequence. Let this new function
      check that ConversionOperatorIdentifiers have a valid TargetType.
      
      Some of the bad inputs found by oss-fuzz, others by inspection.
      
      Differential Revision: https://reviews.llvm.org/D60354
      
      llvm-svn: 357936
      63b97d2a
    • Craig Topper's avatar
      [X86] Fix a couple lowering functions that called ReplaceAllUsesOfValueWith... · 3a4c2192
      Craig Topper authored
      [X86] Fix a couple lowering functions that called ReplaceAllUsesOfValueWith for the newly created code and then return SDValue(). Use MERGE_VALUES instead.
      
      Returning SDValue() makes the caller think custom lowering was unsuccessful and then it will fall back to trying to expand the original node. This expanded code will end up with no users and end up being pruned later. But it was useless unnecessary work to create it.
      
      Instead return a MERGE_VALUES with all the results so the caller knows something changed. The caller can handle the replacements.
      
      For one of the cases I had to use UNDEF has a dummy value for a result we know is unused. This should get pruned later.
      
      llvm-svn: 357935
      3a4c2192
    • Adrian Prantl's avatar
      Add LLVM IR debug info support for Fortran COMMON blocks · 6ed5706a
      Adrian Prantl authored
          COMMON blocks are a feature of Fortran that has no direct analog in C languages, but they are similar to data sections in assembly language programming. A COMMON block is a named area of memory that holds a collection of variables. Fortran subprograms may map the COMMON block memory area to their own, possibly distinct, non-empty list of variables. A Fortran COMMON block might look like the following example.
      
          COMMON /ALPHA/ I, J
      
          For this construct, the compiler generates a new scope-like DI construct (!DICommonBlock) into which variables (see I, J above) can be placed. As the common block implies a range of storage with global lifetime, the !DICommonBlock refers to a !DIGlobalVariable. The Fortran variable that comprise the COMMON block are also linked via metadata to offsets within the global variable that stands for the entire common block.
      
          @alpha_ = common global %alphabytes_ zeroinitializer, align 64, !dbg !27, !dbg !30, !dbg !33
          !14 = distinct !DISubprogram(…)
          !20 = distinct !DICommonBlock(scope: !14, declaration: !25, name: "alpha")
          !25 = distinct !DIGlobalVariable(scope: !20, name: "common alpha", type: !24)
          !27 = !DIGlobalVariableExpression(var: !25, expr: !DIExpression())
          !29 = distinct !DIGlobalVariable(scope: !20, name: "i", file: !3, type: !28)
          !30 = !DIGlobalVariableExpression(var: !29, expr: !DIExpression())
          !31 = distinct !DIGlobalVariable(scope: !20, name: "j", file: !3, type: !28)
          !32 = !DIExpression(DW_OP_plus_uconst, 4)
          !33 = !DIGlobalVariableExpression(var: !31, expr: !32)
      
          The DWARF generated for this is as follows.
      
          DW_TAG_common_block:
          DW_AT_name: alpha
          DW_AT_location: @alpha_+0
          DW_TAG_variable:
          DW_AT_name: common alpha
          DW_AT_type: array of 8 bytes
          DW_AT_location: @alpha_+0
          DW_TAG_variable:
          DW_AT_name: i
          DW_AT_type: integer*4
          DW_AT_location: @Alpha+0
          DW_TAG_variable:
          DW_AT_name: j
          DW_AT_type: integer*4
          DW_AT_location: @Alpha+4
      
      Patch by Eric Schweitz!
      
      Differential Revision: https://reviews.llvm.org/D54327
      
      llvm-svn: 357934
      6ed5706a
    • Alexey Bataev's avatar
      [OPENMP] Sync __kmpc_alloc/_kmpc_free function with the runtime. · 6cf7b715
      Alexey Bataev authored
      Functions __kmpc_alloc/__kmpc_free are updated with the new interfaces.
      Patch synchronizes the compiler with the runtime.
      
      llvm-svn: 357933
      6cf7b715
    • Steven Wu's avatar
      Revert [ThinLTO] Fix ThinLTOCodegenerator to export llvm.used symbols · f41e70d6
      Steven Wu authored
      This reverts r357931 (git commit 8b70a5c1)
      
      llvm-svn: 357932
      f41e70d6
    • Steven Wu's avatar
      [ThinLTO] Fix ThinLTOCodegenerator to export llvm.used symbols · 8b70a5c1
      Steven Wu authored
      Summary:
      ThinLTOCodeGenerator currently does not preserve llvm.used symbols and
      it can internalize them. In order to pass the necessary information to the
      legacy ThinLTOCodeGenerator, the input to the code generator is
      rewritten to be based on lto::InputFile.
      
      This fixes: PR41236
      rdar://problem/49293439
      
      Reviewers: tejohnson, pcc, dexonsmith
      
      Reviewed By: tejohnson
      
      Subscribers: mehdi_amini, inglorion, eraman, hiraditya, jkorous, dang, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D60226
      
      llvm-svn: 357931
      8b70a5c1
    • Brian M. Rzycki's avatar
      [JumpThreading] Fix incorrect fold conditional after indirectbr/callbr · 887865c1
      Brian M. Rzycki authored
      Fixes bug 40992: https://bugs.llvm.org/show_bug.cgi?id=40992
      
      There is potential for miscompiled code emitted from JumpThreading when
      analyzing a block with one or more indirectbr or callbr predecessors. The
      ProcessThreadableEdges() function incorrectly folds conditional branches
      into an unconditional branch.
      
      This patch prevents incorrect branch folding without fully pessimizing
      other potential threading opportunities through the same basic block.
      
      This IR shape was manually fed in via opt and is unclear if clang and the
      full pass pipeline will ever emit similar code shapes.
      
      Thanks to Matthias Liedtke for the bug report and simplified IR example.
      
      Differential Revision: https://reviews.llvm.org/D60284
      
      llvm-svn: 357930
      887865c1
    • Jonathan Peyton's avatar
      [OpenMP] Implement 5.0 memory management · ebf1830b
      Jonathan Peyton authored
      * Replace HBWMALLOC API with more general MEMKIND API, new functions
        and variables added.
      * Have libmemkind.so loaded when accessible.
      * Redirect memspaces to default one except for high bandwidth which
        is processed separately.
      * Ignore some allocator traits e.g., sync_hint, access, pinned, while
        others are processed normally e.g., alignment, pool_size, fallback,
        fb_data, partition.
      * Add tests for memory management
      
      Patch by Andrey Churbanov
      
      Differential Revision: https://reviews.llvm.org/D59783
      
      llvm-svn: 357929
      ebf1830b
    • Amy Huang's avatar
      [MS] Add metadata for __declspec(allocator) · e7bd735b
      Amy Huang authored
      Summary:
      Emit !heapallocsite in the metadata for calls to functions marked with
      __declspec(allocator). Eventually this will be emitted as S_HEAPALLOCSITE debug
      info in codeview.
      
      Reviewers: rnk
      
      Subscribers: jfb, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D60237
      
      llvm-svn: 357928
      e7bd735b
    • Jonathan Peyton's avatar
      [OpenMP] Clean up load balancing dynamic mode · feac33eb
      Jonathan Peyton authored
      This patch cleans up the bookkeeping code for the load balancing dynamic mode.
      
      When a thread is moved to or from the thread pool, the th_active_in_pool flag
      and the __kmp_thread_pool_active_nth global counter are both updated. This
      removes the need for the corrective code in the main wait loop. Another global
      counter, __kmp_thread_pool_nth, was removed completely, as it was only used for
      debugging, but was not under KMP_DEBUG.
      
      Patch by Terry Wilmarth
      
      Differential Revision: https://reviews.llvm.org/D59508
      
      llvm-svn: 357927
      feac33eb
    • Peter Collingbourne's avatar
      ELF: Move verneed tracking data structures out of VersionNeedSection. · d3e20705
      Peter Collingbourne authored
      For partitions I intend to use the same set of version indexes in
      each partition for simplicity. Since each partition will need its own
      VersionNeedSection this will require moving the verneed tracking out of
      VersionNeedSection. The way I've done this is to move most of the tracking
      into SharedFile. What will eventually become the per-partition tracking
      still lives in VersionNeedSection.
      
      As a bonus the code gets a little simpler and more consistent with how we
      handle verdef.
      
      Differential Revision: https://reviews.llvm.org/D60307
      
      llvm-svn: 357926
      d3e20705
    • Peter Collingbourne's avatar
      ELF: De-template SharedFile. NFCI. · cc1618e6
      Peter Collingbourne authored
      Differential Revision: https://reviews.llvm.org/D60305
      
      llvm-svn: 357925
      cc1618e6
    • Craig Topper's avatar
      [X86] Add some fp to integer conversion intrinsics to... · 1b62c758
      Craig Topper authored
      [X86] Add some fp to integer conversion intrinsics to Sema::CheckX86BuiltinRoundingOrSAE so their rounding controls will be checked.
      
      If we don't check this in the frontend we'll get an isel error in the backend later. This is far less friendly to users.
      
      llvm-svn: 357924
      1b62c758
    • Alexey Bataev's avatar
      [OPENMP][NVPTX]Fixed processing of memory management directives. · 1db9bfeb
      Alexey Bataev authored
      Added special processing of the memory management directives/clauses for
      NVPTX target. For private locals, omp_default_mem_alloc and
      omp_thread_mem_alloc result in allocation in local memory.
      omp_const_mem_alloc allocates const memory, omp_teams_mem_alloc
      allocates shared memory, and omp_cgroup_mem_alloc and
      omp_large_cap_mem_alloc allocate global memory.
      
      llvm-svn: 357923
      1db9bfeb
    • Alexander Kornienko's avatar
      Remove a bogus sed option in test. · 10d6008f
      Alexander Kornienko authored
      llvm-svn: 357922
      10d6008f
    • Alexander Kornienko's avatar
      Remove a useless assertion in clang-check. · fb7338b6
      Alexander Kornienko authored
      Re-commit r357915 with a fix for windows.
      
      The assertion prevents it from applying fixes when used along with compilation
      databases with relative paths. Added a test that demonstrates the assertion
      failure.
      
      An example of the assertion:
      input.cpp:11:14: error: expected ';' after top level declarator
      typedef int T
                   ^
                   ;
      input.cpp:11:14: note: FIX-IT applied suggested code changes
      clang-check: clang/tools/clang-check/ClangCheck.cpp:94: virtual std::string (anonymous namespace)::FixItOptions::RewriteFilename(const std::string &, int &): Assertion `llvm::sys::path::is_absolute(filename) && "clang-fixit expects absolute paths only."' failed.
        #0 llvm::sys::PrintStackTrace(llvm::raw_ostream&) llvm/lib/Support/Unix/Signals.inc:494:13
        #1 llvm::sys::RunSignalHandlers() llvm/lib/Support/Signals.cpp:69:18
        #2 SignalHandler(int) llvm/lib/Support/Unix/Signals.inc:357:1
        #3 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x110c0)
        #4 raise (/lib/x86_64-linux-gnu/libc.so.6+0x32fcf)
        #5 abort (/lib/x86_64-linux-gnu/libc.so.6+0x343fa)
        #6 (/lib/x86_64-linux-gnu/libc.so.6+0x2be37)
        #7 (/lib/x86_64-linux-gnu/libc.so.6+0x2bee2)
        #8 void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag)
        #9 void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct_aux<char*>(char*, char*, std::__false_type)
       #10 void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*)
       #11 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
       #12 (anonymous namespace)::FixItOptions::RewriteFilename(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int&) clang/tools/clang-check/ClangCheck.cpp:101:0
       #13 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_data() const
       #14 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_is_local() const
       #15 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_dispose()
       #16 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()
       #17 clang::FixItRewriter::WriteFixedFiles(std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >*) clang/lib/Frontend/Rewrite/FixItRewriter.cpp:98:0
       #18 std::__shared_ptr<clang::CompilerInvocation, (__gnu_cxx::_Lock_policy)2>::get() const
       #19 std::__shared_ptr_access<clang::CompilerInvocation, (__gnu_cxx::_Lock_policy)2, false, false>::_M_get() const
       #20 std::__shared_ptr_access<clang::CompilerInvocation, (__gnu_cxx::_Lock_policy)2, false, false>::operator->() const
       #21 clang::CompilerInstance::getFrontendOpts() clang/include/clang/Frontend/CompilerInstance.h:290:0
       #22 clang::FrontendAction::EndSourceFile() clang/lib/Frontend/FrontendAction.cpp:966:0
       #23 __gnu_cxx::__normal_iterator<clang::FrontendInputFile*, std::vector<clang::FrontendInputFile, std::allocator<clang::FrontendInputFile> > >::operator++()
       #24 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) clang/lib/Frontend/CompilerInstance.cpp:943:0
       #25 clang::tooling::FrontendActionFactory::runInvocation(std::shared_ptr<clang::CompilerInvocation>, clang::FileManager*, std::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticConsumer*) clang/lib/Tooling/Tooling.cpp:369:33
       #26 clang::tooling::ToolInvocation::runInvocation(char const*, clang::driver::Compilation*, std::shared_ptr<clang::CompilerInvocation>, std::shared_ptr<clang::PCHContainerOperations>) clang/lib/Tooling/Tooling.cpp:344:18
       #27 clang::tooling::ToolInvocation::run() clang/lib/Tooling/Tooling.cpp:329:10
       #28 clang::tooling::ClangTool::run(clang::tooling::ToolAction*) clang/lib/Tooling/Tooling.cpp:518:11
       #29 main clang/tools/clang-check/ClangCheck.cpp:187:15
      
      llvm-svn: 357921
      fb7338b6
    • Fangrui Song's avatar
      f67de6c9
    • Andrea Di Biagio's avatar
      [llvm-mca][scheduler-stats] Print issued micro opcodes per cycle. NFCI · f6a60f1f
      Andrea Di Biagio authored
      It makes more sense to print out the number of micro opcodes that are issued
      every cycle rather than the number of instructions issued per cycle.
      This behavior is also consistent with the dispatch-stats: numbers from the two
      views can now be easily compared.
      
      llvm-svn: 357919
      f6a60f1f
    • Simon Pilgrim's avatar
      Revert rL357915 from cfe/trunk: Remove a useless assertion in clang-check. · 5058ca6d
      Simon Pilgrim authored
      The assertion prevents it from applying fixes when used along with compilation
      databases with relative paths. Added a test that demonstrates the assertion
      failure.
      
      An example of the assertion:
      input.cpp:11:14: error: expected ';' after top level declarator
      typedef int T
                   ^
                   ;
      input.cpp:11:14: note: FIX-IT applied suggested code changes
      clang-check: clang/tools/clang-check/ClangCheck.cpp:94: virtual std::string (anonymous namespace)::FixItOptions::RewriteFilename(const std::string &, int &): Assertion `llvm::sys::path::is_absolute(filename) && "clang-fixit expects absolute paths only."' failed.
        #0 llvm::sys::PrintStackTrace(llvm::raw_ostream&) llvm/lib/Support/Unix/Signals.inc:494:13
        #1 llvm::sys::RunSignalHandlers() llvm/lib/Support/Signals.cpp:69:18
        #2 SignalHandler(int) llvm/lib/Support/Unix/Signals.inc:357:1
        #3 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x110c0)
        #4 raise (/lib/x86_64-linux-gnu/libc.so.6+0x32fcf)
        #5 abort (/lib/x86_64-linux-gnu/libc.so.6+0x343fa)
        #6 (/lib/x86_64-linux-gnu/libc.so.6+0x2be37)
        #7 (/lib/x86_64-linux-gnu/libc.so.6+0x2bee2)
        #8 void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag)
        #9 void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct_aux<char*>(char*, char*, std::__false_type)
       #10 void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*)
       #11 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
       #12 (anonymous namespace)::FixItOptions::RewriteFilename(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int&) clang/tools/clang-check/ClangCheck.cpp:101:0
       #13 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_data() const
       #14 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_is_local() const
       #15 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_dispose()
       #16 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()
       #17 clang::FixItRewriter::WriteFixedFiles(std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >*) clang/lib/Frontend/Rewrite/FixItRewriter.cpp:98:0
       #18 std::__shared_ptr<clang::CompilerInvocation, (__gnu_cxx::_Lock_policy)2>::get() const
       #19 std::__shared_ptr_access<clang::CompilerInvocation, (__gnu_cxx::_Lock_policy)2, false, false>::_M_get() const
       #20 std::__shared_ptr_access<clang::CompilerInvocation, (__gnu_cxx::_Lock_policy)2, false, false>::operator->() const
       #21 clang::CompilerInstance::getFrontendOpts() clang/include/clang/Frontend/CompilerInstance.h:290:0
       #22 clang::FrontendAction::EndSourceFile() clang/lib/Frontend/FrontendAction.cpp:966:0
       #23 __gnu_cxx::__normal_iterator<clang::FrontendInputFile*, std::vector<clang::FrontendInputFile, std::allocator<clang::FrontendInputFile> > >::operator++()
       #24 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) clang/lib/Frontend/CompilerInstance.cpp:943:0
       #25 clang::tooling::FrontendActionFactory::runInvocation(std::shared_ptr<clang::CompilerInvocation>, clang::FileManager*, std::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticConsumer*) clang/lib/Tooling/Tooling.cpp:369:33
       #26 clang::tooling::ToolInvocation::runInvocation(char const*, clang::driver::Compilation*, std::shared_ptr<clang::CompilerInvocation>, std::shared_ptr<clang::PCHContainerOperations>) clang/lib/Tooling/Tooling.cpp:344:18
       #27 clang::tooling::ToolInvocation::run() clang/lib/Tooling/Tooling.cpp:329:10
       #28 clang::tooling::ClangTool::run(clang::tooling::ToolAction*) clang/lib/Tooling/Tooling.cpp:518:11
       #29 main clang/tools/clang-check/ClangCheck.cpp:187:15
      ........
      Breaks windows buildbots
      
      llvm-svn: 357918
      5058ca6d
    • Rainer Orth's avatar
      [python, tests] Disable Clang Python tests on SPARC · 04ee339a
      Rainer Orth authored
      Running `make check-all` fails on Solaris 11/SPARC since the clang python
      tests FAIL:
      
        ............................
        ======================================================================
        FAIL: test_extent (tests.cindex.test_location.TestLocation)
        ----------------------------------------------------------------------
        Traceback (most recent call last):
          File "tests/cindex/test_location.py", line 87, in test_extent
            self.assert_location(one.extent.start,line=1,column=1,offset=0)
          File "tests/cindex/test_location.py", line 22, in assert_location
            self.assertEqual(loc.column, column)
        AssertionError: 5 != 1
        
        ======================================================================
        FAIL: test_get_children (tests.cindex.test_cursor.TestCursor)
        ----------------------------------------------------------------------
        Traceback (most recent call last):
          File "tests/cindex/test_cursor.py", line 70, in test_get_children
            self.assertEqual(tu_nodes[0].is_definition(), True)
        AssertionError: False != True
        
        ----------------------------------------------------------------------
        Ran 126 tests in 2.123s
        
        FAILED (failures=2, skipped=6)
        
      Unfortunately, this aborts the rest of `make check-all`, even with `-k`, so
      this patch disables the test as is already done on a couple of other
      targets.
        
      This allowed the `sparc-sun-solaris2.11` test to finish.
      
      Differential Revision: https://reviews.llvm.org/D60046
      
      llvm-svn: 357917
      04ee339a
    • Eric Liu's avatar
      [clangd] Add fallback mode for code completion when compile command or preamble is not ready. · dd028259
      Eric Liu authored
      Summary:
      When calling TUScehduler::runWithPreamble (e.g. in code compleiton), allow
      entering a fallback mode when compile command or preamble is not ready, instead of
      waiting. This allows clangd to perform naive code completion e.g. using identifiers
      in the current file or symbols in the index.
      
      This patch simply returns empty result for code completion in fallback mode. Identifier-based
      plus more advanced index-based completion will be added in followup patches.
      
      Reviewers: ilya-biryukov, sammccall
      
      Reviewed By: sammccall
      
      Subscribers: sammccall, javed.absar, MaskRay, jkorous, arphaman, kadircet, jdoerfert, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D59811
      
      llvm-svn: 357916
      dd028259
    • Alexander Kornienko's avatar
      Remove a useless assertion in clang-check. · c70d38e9
      Alexander Kornienko authored
      The assertion prevents it from applying fixes when used along with compilation
      databases with relative paths. Added a test that demonstrates the assertion
      failure.
      
      An example of the assertion:
      input.cpp:11:14: error: expected ';' after top level declarator
      typedef int T
                   ^
                   ;
      input.cpp:11:14: note: FIX-IT applied suggested code changes
      clang-check: clang/tools/clang-check/ClangCheck.cpp:94: virtual std::string (anonymous namespace)::FixItOptions::RewriteFilename(const std::string &, int &): Assertion `llvm::sys::path::is_absolute(filename) && "clang-fixit expects absolute paths only."' failed.
        #0 llvm::sys::PrintStackTrace(llvm::raw_ostream&) llvm/lib/Support/Unix/Signals.inc:494:13
        #1 llvm::sys::RunSignalHandlers() llvm/lib/Support/Signals.cpp:69:18
        #2 SignalHandler(int) llvm/lib/Support/Unix/Signals.inc:357:1
        #3 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x110c0)
        #4 raise (/lib/x86_64-linux-gnu/libc.so.6+0x32fcf)
        #5 abort (/lib/x86_64-linux-gnu/libc.so.6+0x343fa)
        #6 (/lib/x86_64-linux-gnu/libc.so.6+0x2be37)
        #7 (/lib/x86_64-linux-gnu/libc.so.6+0x2bee2)
        #8 void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag)
        #9 void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct_aux<char*>(char*, char*, std::__false_type)
       #10 void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*)
       #11 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
       #12 (anonymous namespace)::FixItOptions::RewriteFilename(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int&) clang/tools/clang-check/ClangCheck.cpp:101:0
       #13 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_data() const
       #14 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_is_local() const
       #15 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_dispose()
       #16 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()
       #17 clang::FixItRewriter::WriteFixedFiles(std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >*) clang/lib/Frontend/Rewrite/FixItRewriter.cpp:98:0
       #18 std::__shared_ptr<clang::CompilerInvocation, (__gnu_cxx::_Lock_policy)2>::get() const
       #19 std::__shared_ptr_access<clang::CompilerInvocation, (__gnu_cxx::_Lock_policy)2, false, false>::_M_get() const
       #20 std::__shared_ptr_access<clang::CompilerInvocation, (__gnu_cxx::_Lock_policy)2, false, false>::operator->() const
       #21 clang::CompilerInstance::getFrontendOpts() clang/include/clang/Frontend/CompilerInstance.h:290:0
       #22 clang::FrontendAction::EndSourceFile() clang/lib/Frontend/FrontendAction.cpp:966:0
       #23 __gnu_cxx::__normal_iterator<clang::FrontendInputFile*, std::vector<clang::FrontendInputFile, std::allocator<clang::FrontendInputFile> > >::operator++()
       #24 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) clang/lib/Frontend/CompilerInstance.cpp:943:0
       #25 clang::tooling::FrontendActionFactory::runInvocation(std::shared_ptr<clang::CompilerInvocation>, clang::FileManager*, std::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticConsumer*) clang/lib/Tooling/Tooling.cpp:369:33
       #26 clang::tooling::ToolInvocation::runInvocation(char const*, clang::driver::Compilation*, std::shared_ptr<clang::CompilerInvocation>, std::shared_ptr<clang::PCHContainerOperations>) clang/lib/Tooling/Tooling.cpp:344:18
       #27 clang::tooling::ToolInvocation::run() clang/lib/Tooling/Tooling.cpp:329:10
       #28 clang::tooling::ClangTool::run(clang::tooling::ToolAction*) clang/lib/Tooling/Tooling.cpp:518:11
       #29 main clang/tools/clang-check/ClangCheck.cpp:187:15
      
      llvm-svn: 357915
      c70d38e9
    • Simon Pilgrim's avatar
      [X86][AVX] Add PR34380 shuffle test cases · 86844a86
      Simon Pilgrim authored
      llvm-svn: 357914
      86844a86
    • Balazs Keri's avatar
      Changed every use of ASTImporter::Import to Import_New · a1f6b103
      Balazs Keri authored
      Reviewers: a.sidorin, shafik, martong, a_sidorin
      
      Reviewed By: a_sidorin
      
      Subscribers: rnkovacs, dkrupp, martong, Szelethus, gamesh411, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D55049
      
      llvm-svn: 357913
      a1f6b103
Loading