[PATCH] D128213: [IR] Export ConstantFold.h header (NFC)

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 23 02:32:29 PDT 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG20b5f0c641c9: [IR] Export ConstantFold.h header (NFC) (authored by nikic).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128213/new/

https://reviews.llvm.org/D128213

Files:
  llvm/include/llvm/IR/ConstantFold.h
  llvm/lib/IR/ConstantFold.cpp
  llvm/lib/IR/ConstantFold.h
  llvm/lib/IR/Constants.cpp


Index: llvm/lib/IR/Constants.cpp
===================================================================
--- llvm/lib/IR/Constants.cpp
+++ llvm/lib/IR/Constants.cpp
@@ -11,12 +11,12 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/IR/Constants.h"
-#include "ConstantFold.h"
 #include "LLVMContextImpl.h"
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/StringMap.h"
 #include "llvm/IR/BasicBlock.h"
+#include "llvm/IR/ConstantFold.h"
 #include "llvm/IR/DerivedTypes.h"
 #include "llvm/IR/Function.h"
 #include "llvm/IR/GetElementPtrTypeIterator.h"
Index: llvm/lib/IR/ConstantFold.cpp
===================================================================
--- llvm/lib/IR/ConstantFold.cpp
+++ llvm/lib/IR/ConstantFold.cpp
@@ -16,7 +16,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "ConstantFold.h"
+#include "llvm/IR/ConstantFold.h"
 #include "llvm/ADT/APSInt.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/IR/Constants.h"
Index: llvm/include/llvm/IR/ConstantFold.h
===================================================================
--- llvm/include/llvm/IR/ConstantFold.h
+++ llvm/include/llvm/IR/ConstantFold.h
@@ -1,4 +1,4 @@
-//===-- ConstantFolding.h - Internal Constant Folding Interface -*- C++ -*-===//
+//==-- ConstantFold.h - DL-independent Constant Folding Interface -*- C++ -*-=//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -6,23 +6,26 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// This file defines the (internal) constant folding interfaces for LLVM.  These
-// interfaces are used by the ConstantExpr::get* methods to automatically fold
-// constants when possible.
+// This file defines the DataLayout-independent constant folding interface.
+// When possible, the DataLayout-aware constant folding interface in
+// Analysis/ConstantFolding.h should be preferred.
+//
+// These interfaces are used by the ConstantExpr::get* methods to automatically
+// fold constants when possible.
 //
 // These operators may return a null object if they don't know how to perform
 // the specified operation on the specified constant types.
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_LIB_IR_CONSTANTFOLD_H
-#define LLVM_LIB_IR_CONSTANTFOLD_H
+#ifndef LLVM_IR_CONSTANTFOLD_H
+#define LLVM_IR_CONSTANTFOLD_H
 
 #include "llvm/ADT/Optional.h"
 #include "llvm/IR/InstrTypes.h"
 
 namespace llvm {
-template <typename T> class ArrayRef;
+  template <typename T> class ArrayRef;
   class Value;
   class Constant;
   class Type;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128213.439289.patch
Type: text/x-patch
Size: 2793 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220623/1d5b16b6/attachment.bin>


More information about the llvm-commits mailing list