[llvm] r302194 - [ConstantRange] Add LLVM_NODISCARD to ConstantRange since a large number of its methods construct new ConstantRange objects.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Thu May 4 14:29:50 PDT 2017


Author: ctopper
Date: Thu May  4 16:29:50 2017
New Revision: 302194

URL: http://llvm.org/viewvc/llvm-project?rev=302194&view=rev
Log:
[ConstantRange] Add LLVM_NODISCARD to ConstantRange since a large number of its methods construct new ConstantRange objects.

Modified:
    llvm/trunk/include/llvm/IR/ConstantRange.h

Modified: llvm/trunk/include/llvm/IR/ConstantRange.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/ConstantRange.h?rev=302194&r1=302193&r2=302194&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/ConstantRange.h (original)
+++ llvm/trunk/include/llvm/IR/ConstantRange.h Thu May  4 16:29:50 2017
@@ -41,7 +41,7 @@ namespace llvm {
 class MDNode;
 
 /// This class represents a range of values.
-class ConstantRange {
+class LLVM_NODISCARD ConstantRange {
   APInt Lower, Upper;
 
 public:




More information about the llvm-commits mailing list