Skip to content

Commit 0eccb09

Browse files
author
Bharadwaj Yadavalli
committed
Delete call normalize TargetOpts Triple in createTargetMachineForTriple
As a result any dxil triple specified in testing tools that invoke this function is treated unmodified and intentional. Hence it is not modified to include an implicit DXIL version - per PR feedback. Restored change to MIR test file.
1 parent a370808 commit 0eccb09

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

llvm/lib/CodeGen/CommandFlags.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ void codegen::setFunctionAttributes(StringRef CPU, StringRef Features,
744744
Expected<std::unique_ptr<TargetMachine>>
745745
codegen::createTargetMachineForTriple(StringRef TargetTriple,
746746
CodeGenOptLevel OptLevel) {
747-
Triple TheTriple(llvm::Triple::normalize(TargetTriple.str()));
747+
Triple TheTriple(TargetTriple.str());
748748
std::string Error;
749749
const auto *TheTarget =
750750
TargetRegistry::lookupTarget(codegen::getMArch(), TheTriple, Error);

llvm/test/tools/llvm-reduce/mir/infer-triple-unknown-target.mir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# RUN: not llvm-reduce --test FileCheck %s -o /dev/null 2>&1 | FileCheck %s
22

3-
# CHECK: error: unable to get target for 'omgwtfbbqcpu64-unknown-unknown', see --version and --triple.
3+
# CHECK: error: unable to get target for 'omgwtfbbqcpu64--', see --version and --triple.
44

55
--- |
66
target triple = "omgwtfbbqcpu64--"

0 commit comments

Comments
 (0)