Skip to content

Commit

Permalink
[OpenMP] Remove static allocator in linker wrapper
Browse files Browse the repository at this point in the history
Summary:
We don't need this static allocator to survive the entire file, the
strings stored have a defined lifetime.
  • Loading branch information
jhuber6 committed Feb 23, 2022
1 parent 55cb84d commit 6a0b78a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
Expand Up @@ -142,9 +142,6 @@ static SmallVector<std::string, 16> TempFiles;
/// Codegen flags for LTO backend.
static codegen::RegisterCodeGenFlags CodeGenFlags;

/// Static buffer to hold StringRef values.
static BumpPtrAllocator Alloc;

/// Magic section string that marks the existence of offloading data. The
/// section string will be formatted as `.llvm.offloading.<triple>.<arch>`.
#define OFFLOAD_SECTION_MAGIC_STR ".llvm.offloading."
Expand Down Expand Up @@ -866,6 +863,7 @@ Error linkBitcodeFiles(SmallVectorImpl<std::string> &InputFiles,
SmallVector<std::string, 4> NewInputFiles;
DenseSet<StringRef> UsedInRegularObj;
DenseSet<StringRef> UsedInSharedLib;
BumpPtrAllocator Alloc;
StringSaver Saver(Alloc);

// Search for bitcode files in the input and create an LTO input file. If it
Expand Down

0 comments on commit 6a0b78a

Please sign in to comment.