[llvm] ffe6695 - Fix buildbots with merge that didn't happen for 4050b01ba9ece02721ec496383baee219ca8cc2b.
Greg Clayton via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 4 19:28:51 PST 2020
Author: Greg Clayton
Date: 2020-03-04T19:28:24-08:00
New Revision: ffe6695acf1f011a2acda31624beee826fb68956
URL: https://github.com/llvm/llvm-project/commit/ffe6695acf1f011a2acda31624beee826fb68956
DIFF: https://github.com/llvm/llvm-project/commit/ffe6695acf1f011a2acda31624beee826fb68956.diff
LOG: Fix buildbots with merge that didn't happen for 4050b01ba9ece02721ec496383baee219ca8cc2b.
Added:
Modified:
llvm/lib/DebugInfo/GSYM/GsymCreator.cpp
Removed:
################################################################################
diff --git a/llvm/lib/DebugInfo/GSYM/GsymCreator.cpp b/llvm/lib/DebugInfo/GSYM/GsymCreator.cpp
index f7d7afec9d55..7d9b72c6283d 100644
--- a/llvm/lib/DebugInfo/GSYM/GsymCreator.cpp
+++ b/llvm/lib/DebugInfo/GSYM/GsymCreator.cpp
@@ -29,7 +29,13 @@ uint32_t GsymCreator::insertFile(StringRef Path,
llvm::sys::path::Style Style) {
llvm::StringRef directory = llvm::sys::path::parent_path(Path, Style);
llvm::StringRef filename = llvm::sys::path::filename(Path, Style);
- FileEntry FE(insertString(directory), insertString(filename));
+ // We must insert the strings first, then call the FileEntry constructor.
+ // If we inline the insertString() function call into the constructor, the
+ // call order is undefined due to parameter lists not having any ordering
+ // requirements.
+ const uint32_t Dir = insertString(directory);
+ const uint32_t Base = insertString(filename);
+ FileEntry FE(Dir, Base);
std::lock_guard<std::recursive_mutex> Guard(Mutex);
const auto NextIndex = Files.size();
More information about the llvm-commits
mailing list