Browse Source

Make precise helper function take const pointer (#329)

David Peixotto 8 years ago
parent
commit
99470ad061
2 changed files with 2 additions and 2 deletions
  1. 1 1
      include/dxc/HLSL/DxilMetadataHelper.h
  2. 1 1
      lib/HLSL/DxilMetadataHelper.cpp

+ 1 - 1
include/dxc/HLSL/DxilMetadataHelper.h

@@ -379,7 +379,7 @@ public:
   static llvm::Value *ValueMDToValue(const llvm::MDOperand &MDO);
   llvm::MDTuple *Uint32VectorToConstMDTuple(const std::vector<unsigned> &Vec);
   void ConstMDTupleToUint32Vector(llvm::MDTuple *pTupleMD, std::vector<unsigned> &Vec);
-  static bool IsMarkedPrecise(llvm::Instruction *inst);
+  static bool IsMarkedPrecise(const llvm::Instruction *inst);
   static void MarkPrecise(llvm::Instruction *inst);
 
 private:

+ 1 - 1
lib/HLSL/DxilMetadataHelper.cpp

@@ -1428,7 +1428,7 @@ void DxilMDHelper::ConstMDTupleToUint32Vector(MDTuple *pTupleMD, std::vector<uns
   }
 }
 
-bool DxilMDHelper::IsMarkedPrecise(Instruction *inst) {
+bool DxilMDHelper::IsMarkedPrecise(const Instruction *inst) {
   int32_t val = 0;
   if (MDNode *precise = inst->getMetadata(kDxilPreciseAttributeMDName)) {
     assert(precise->getNumOperands() == 1);