| Index: src/IceConverter.cpp
|
| diff --git a/src/IceConverter.cpp b/src/IceConverter.cpp
|
| index 111a52b37fc31988c642cd1d294aff9888ccb265..a078a676af870df2fd5087b83524d64dd548489f 100644
|
| --- a/src/IceConverter.cpp
|
| +++ b/src/IceConverter.cpp
|
| @@ -555,19 +555,15 @@ private:
|
|
|
| if (const auto Target = dyn_cast<Ice::ConstantRelocatable>(CallTarget)) {
|
| // Check if this direct call is to an Intrinsic (starts with "llvm.")
|
| - static const char LLVMPrefix[] = "llvm.";
|
| - const size_t LLVMPrefixLen = strlen(LLVMPrefix);
|
| - Ice::IceString Name = Target->getName();
|
| - if (Name.substr(0, LLVMPrefixLen) == LLVMPrefix) {
|
| - Ice::IceString NameSuffix = Name.substr(LLVMPrefixLen);
|
| - Info = Ctx->getIntrinsicsInfo().find(NameSuffix);
|
| - if (!Info) {
|
| - report_fatal_error(std::string("Invalid PNaCl intrinsic call: ") +
|
| - LLVMObjectAsString(Inst));
|
| - }
|
| + bool BadIntrinsic;
|
| + Info = Ctx->getIntrinsicsInfo().find(Target->getName(), BadIntrinsic);
|
| + if (BadIntrinsic) {
|
| + report_fatal_error(std::string("Invalid PNaCl intrinsic call: ") +
|
| + LLVMObjectAsString(Inst));
|
| + }
|
| + if (Info)
|
| NewInst = Ice::InstIntrinsicCall::create(Func.get(), NumArgs, Dest,
|
| CallTarget, Info->Info);
|
| - }
|
| }
|
|
|
| // Not an intrinsic call.
|
|
|