summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Peixotto <dpeixott@codeaurora.org>2014-02-06 18:19:40 +0000
committerDavid Peixotto <dpeixott@codeaurora.org>2014-02-06 18:19:40 +0000
commit4ed2667c138442319f0c3dcc019def8735233a90 (patch)
tree20d16c37130694d9991bd7355a39fac1aa9f9a31 /include
parent0c245b69f7a6b9eaa1386f7c2251a47a253ced62 (diff)
downloadllvm-4ed2667c138442319f0c3dcc019def8735233a90.tar.gz
llvm-4ed2667c138442319f0c3dcc019def8735233a90.tar.bz2
llvm-4ed2667c138442319f0c3dcc019def8735233a90.tar.xz
Remove const_cast for STI when parsing inline asm
In a previous commit (r199818) we added a const_cast to an existing subtarget info instead of creating a new one so that we could reuse it when creating the TargetAsmParser for parsing inline assembly. This cast was necessary because we needed to reuse the existing STI to avoid generating incorrect code when the inline asm contained mode-switching directives (e.g. .code 16). The root cause of the failure was that there was an implicit sharing of the STI between the parser and the MCCodeEmitter. To fix a different but related issue, we now explicitly pass the STI to the MCCodeEmitter (see commits r200345-r200351). The const_cast is no longer necessary and we can now create a fresh STI for the inline asm parser to use. Differential Revision: http://llvm-reviews.chandlerc.com/D2709 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200929 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/CodeGen/AsmPrinter.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/AsmPrinter.h b/include/llvm/CodeGen/AsmPrinter.h
index f83d96783c..79c7fec3ce 100644
--- a/include/llvm/CodeGen/AsmPrinter.h
+++ b/include/llvm/CodeGen/AsmPrinter.h
@@ -475,7 +475,7 @@ namespace llvm {
/// \p EndInfo - the final subtarget info after parsing the inline asm,
/// or NULL if the value is unknown.
virtual void emitInlineAsmEnd(const MCSubtargetInfo &StartInfo,
- MCSubtargetInfo *EndInfo) const;
+ const MCSubtargetInfo *EndInfo) const;
private:
/// Private state for PrintSpecial()