diff --git a/llvm/include/llvm/Analysis/DXILResource.h b/llvm/include/llvm/Analysis/DXILResource.h index 2631c3cb94c8a..3f62981d37acd 100644 --- a/llvm/include/llvm/Analysis/DXILResource.h +++ b/llvm/include/llvm/Analysis/DXILResource.h @@ -375,7 +375,7 @@ class ResourceInfo { const ResourceBinding &getBinding() const { return Binding; } TargetExtType *getHandleTy() const { return HandleTy; } - const StringRef getName() const { return Symbol ? Symbol->getName() : ""; } + StringRef getName() const { return Symbol ? Symbol->getName() : ""; } bool hasSymbol() const { return Symbol; } GlobalVariable *createSymbol(Module &M, StructType *Ty, StringRef Name = ""); diff --git a/llvm/lib/Target/ARM/MCTargetDesc/ARMAddressingModes.h b/llvm/lib/Target/ARM/MCTargetDesc/ARMAddressingModes.h index 28e5840fdde5b..036a859505d25 100644 --- a/llvm/lib/Target/ARM/MCTargetDesc/ARMAddressingModes.h +++ b/llvm/lib/Target/ARM/MCTargetDesc/ARMAddressingModes.h @@ -41,7 +41,7 @@ namespace ARM_AM { inline const char *getAddrOpcStr(AddrOpc Op) { return Op == sub ? "-" : ""; } - inline const StringRef getShiftOpcStr(ShiftOpc Op) { + inline StringRef getShiftOpcStr(ShiftOpc Op) { switch (Op) { default: llvm_unreachable("Unknown shift opc!"); case ARM_AM::asr: return "asr";