Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions llvm/lib/LTO/LTOCodeGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,9 @@ bool LTOCodeGenerator::determineTarget() {

TripleStr = MergedModule->getTargetTriple().str();
llvm::Triple Triple(TripleStr);
if (TripleStr.empty()) {
TripleStr = sys::getDefaultTargetTriple();
if (Triple.empty()) {
Triple = llvm::Triple(sys::getDefaultTargetTriple());
TripleStr = Triple.getTriple();
MergedModule->setTargetTriple(Triple);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could also rewrite this to avoid constructing the wrong triple to start with

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated. Thanks.

}

Expand Down