[llvm] e1e9b0c - [NFC] To fix comment in the code as getIntN no longer does truncation. (#178834)

via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 31 05:07:57 PST 2026


Author: Daniel Chen
Date: 2026-01-31T08:07:52-05:00
New Revision: e1e9b0ce310ea55537e04d3c6a9c810b6a746def

URL: https://github.com/llvm/llvm-project/commit/e1e9b0ce310ea55537e04d3c6a9c810b6a746def
DIFF: https://github.com/llvm/llvm-project/commit/e1e9b0ce310ea55537e04d3c6a9c810b6a746def.diff

LOG: [NFC] To fix comment in the code as getIntN no longer does truncation. (#178834)

The comment of `getIntN` says it may truncate the result. However, PR
#171456 changed the default of truncation of `ConstantInt::get` to
false, so it no longer truncates. Fix the comments to reflect the
change.

Added: 
    

Modified: 
    llvm/include/llvm/IR/IRBuilder.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/IR/IRBuilder.h b/llvm/include/llvm/IR/IRBuilder.h
index 4d99756628399..9ad9e59d9ceae 100644
--- a/llvm/include/llvm/IR/IRBuilder.h
+++ b/llvm/include/llvm/IR/IRBuilder.h
@@ -528,8 +528,7 @@ class IRBuilderBase {
     return ConstantInt::get(getInt64Ty(), C);
   }
 
-  /// Get a constant N-bit value, zero extended or truncated from
-  /// a 64-bit value.
+  /// Get a constant N-bit value, zero extended from a 64-bit value.
   ConstantInt *getIntN(unsigned N, uint64_t C) {
     return ConstantInt::get(getIntNTy(N), C);
   }


        


More information about the llvm-commits mailing list