Skip to content

Commit ffe6695

Browse files
committed
Fix buildbots with merge that didn't happen for 4050b01.
1 parent 4050b01 commit ffe6695

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

llvm/lib/DebugInfo/GSYM/GsymCreator.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,13 @@ uint32_t GsymCreator::insertFile(StringRef Path,
2929
llvm::sys::path::Style Style) {
3030
llvm::StringRef directory = llvm::sys::path::parent_path(Path, Style);
3131
llvm::StringRef filename = llvm::sys::path::filename(Path, Style);
32-
FileEntry FE(insertString(directory), insertString(filename));
32+
// We must insert the strings first, then call the FileEntry constructor.
33+
// If we inline the insertString() function call into the constructor, the
34+
// call order is undefined due to parameter lists not having any ordering
35+
// requirements.
36+
const uint32_t Dir = insertString(directory);
37+
const uint32_t Base = insertString(filename);
38+
FileEntry FE(Dir, Base);
3339

3440
std::lock_guard<std::recursive_mutex> Guard(Mutex);
3541
const auto NextIndex = Files.size();

0 commit comments

Comments
 (0)