Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions gematria/llvm/llvm_architecture_support.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ LlvmArchitectureSupport::FromTriple(std::string_view llvm_triple,
std::string lookup_error;
// TODO(ondrasej): Remove the std::string() conversion once it's no longer
// needed.
const llvm::Target* const llvm_target =
llvm::TargetRegistry::lookupTarget(llvm_triple, lookup_error);
const llvm::Target* const llvm_target = llvm::TargetRegistry::lookupTarget(
llvm::Triple(llvm::StringRef(llvm_triple)), lookup_error);
if (llvm_target == nullptr) {
return llvm::make_error<llvm::StringError>(
llvm::errc::not_supported,
Expand Down
4 changes: 2 additions & 2 deletions llvm_cm/tools/llvm-cm/llvm-cm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,9 +465,9 @@ int main(int argc, char *argv[]) {

// Start setting up the disassembler.
std::string Error;
const Target *TheTarget = TargetRegistry::lookupTarget(TripleName, Error);
exitIf(!TheTarget, Error);
llvm::Triple TargetTriple(TripleName);
const Target *TheTarget = TargetRegistry::lookupTarget(TargetTriple, Error);
exitIf(!TheTarget, Error);

std::unique_ptr<MCRegisterInfo> MRI(TheTarget->createMCRegInfo(TargetTriple));
assert(MRI && "Unable to create target register info!");
Expand Down
Loading