Remove extraneous parens and extraneous const cast (and fix the
authorEric Christopher <echristo@gmail.com>
Fri, 27 Jun 2014 01:27:03 +0000 (01:27 +0000)
committerEric Christopher <echristo@gmail.com>
Fri, 27 Jun 2014 01:27:03 +0000 (01:27 +0000)
prototype for the function to patch what we were returning).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211837 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/NVPTX/NVPTXTargetMachine.h

index 2db7c18..3631779 100644 (file)
@@ -59,11 +59,11 @@ public:
   const NVPTXSubtarget *getSubtargetImpl() const override { return &Subtarget; }
 
   const NVPTXRegisterInfo *getRegisterInfo() const override {
-    return &(InstrInfo.getRegisterInfo());
+    return &InstrInfo.getRegisterInfo();
   }
 
-  NVPTXTargetLowering *getTargetLowering() const override {
-    return const_cast<NVPTXTargetLowering *>(&TLInfo);
+  const NVPTXTargetLowering *getTargetLowering() const override {
+    return &TLInfo;
   }
 
   const TargetSelectionDAGInfo *getSelectionDAGInfo() const override {