diff options
author | Mehdi Amini <mehdi.amini@apple.com> | 2016-10-01 06:46:33 +0000 |
---|---|---|
committer | Mehdi Amini <mehdi.amini@apple.com> | 2016-10-01 06:46:33 +0000 |
commit | 36d33fc1098a2377bf6b5a20e98351c06db0cfe1 (patch) | |
tree | e47beafb5ea59b4094b95accd5447a8e9951fa26 /llvm/lib/CodeGen | |
parent | cd354a659b89cf5fed6a578ec3fb665607c573ac (diff) | |
download | bcm5719-llvm-36d33fc1098a2377bf6b5a20e98351c06db0cfe1.tar.gz bcm5719-llvm-36d33fc1098a2377bf6b5a20e98351c06db0cfe1.zip |
Use StringRef instead of raw pointers in MCAsmInfo/MCInstrInfo APIs (NFC)
llvm-svn: 283018
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/MachineBasicBlock.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/CodeGen/TargetInstrInfo.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp index 55138f64198..57684cdcc2f 100644 --- a/llvm/lib/CodeGen/MachineBasicBlock.cpp +++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp @@ -51,7 +51,7 @@ MCSymbol *MachineBasicBlock::getSymbol() const { if (!CachedMCSymbol) { const MachineFunction *MF = getParent(); MCContext &Ctx = MF->getContext(); - const char *Prefix = Ctx.getAsmInfo()->getPrivateLabelPrefix(); + auto Prefix = Ctx.getAsmInfo()->getPrivateLabelPrefix(); assert(getNumber() >= 0 && "cannot get label for unreachable MBB"); CachedMCSymbol = Ctx.getOrCreateSymbol(Twine(Prefix) + "BB" + Twine(MF->getFunctionNumber()) + diff --git a/llvm/lib/CodeGen/TargetInstrInfo.cpp b/llvm/lib/CodeGen/TargetInstrInfo.cpp index d71f84d1249..7ac2210ac52 100644 --- a/llvm/lib/CodeGen/TargetInstrInfo.cpp +++ b/llvm/lib/CodeGen/TargetInstrInfo.cpp @@ -84,8 +84,8 @@ unsigned TargetInstrInfo::getInlineAsmLength(const char *Str, if (*Str == '\n' || strncmp(Str, MAI.getSeparatorString(), strlen(MAI.getSeparatorString())) == 0) { atInsnStart = true; - } else if (strncmp(Str, MAI.getCommentString(), - strlen(MAI.getCommentString())) == 0) { + } else if (strncmp(Str, MAI.getCommentString().data(), + MAI.getCommentString().size()) == 0) { // Stop counting as an instruction after a comment until the next // separator. atInsnStart = false; |