[clang] e4df934 - [Clang interpreter] Rename Block.{h,cpp} to InterpBlock.{h,cpp}

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 21 09:49:07 PST 2020


Author: Fangrui Song
Date: 2020-02-21T09:47:28-08:00
New Revision: e4df934ca7b408cfb52531016198545a8d50f41a

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

LOG: [Clang interpreter] Rename Block.{h,cpp} to InterpBlock.{h,cpp}

The Blocks runtime provide a header named Block.h.
It is generally preferable to avoid name collision with system headers
(reducing reliance on -isystem order, more friendly when navigating files in
an editor, etc).

Reviewed By: gribozavr2

Differential Revision: https://reviews.llvm.org/D74934

Added: 
    clang/lib/AST/Interp/InterpBlock.cpp
    clang/lib/AST/Interp/InterpBlock.h

Modified: 
    clang/lib/AST/CMakeLists.txt
    clang/lib/AST/Interp/Pointer.cpp
    clang/lib/AST/Interp/Pointer.h
    llvm/utils/gn/secondary/clang/lib/AST/BUILD.gn

Removed: 
    clang/lib/AST/Interp/Block.cpp
    clang/lib/AST/Interp/Block.h


################################################################################
diff  --git a/clang/lib/AST/CMakeLists.txt b/clang/lib/AST/CMakeLists.txt
index a741ca5a80e1..da7b808e4f51 100644
--- a/clang/lib/AST/CMakeLists.txt
+++ b/clang/lib/AST/CMakeLists.txt
@@ -55,7 +55,6 @@ add_clang_library(clangAST
   ExternalASTSource.cpp
   FormatString.cpp
   InheritViz.cpp
-  Interp/Block.cpp
   Interp/ByteCodeEmitter.cpp
   Interp/ByteCodeExprGen.cpp
   Interp/ByteCodeGenError.cpp
@@ -67,6 +66,7 @@ add_clang_library(clangAST
   Interp/Frame.cpp
   Interp/Function.cpp
   Interp/Interp.cpp
+  Interp/InterpBlock.cpp
   Interp/InterpFrame.cpp
   Interp/InterpStack.cpp
   Interp/InterpState.cpp

diff  --git a/clang/lib/AST/Interp/Block.cpp b/clang/lib/AST/Interp/InterpBlock.cpp
similarity index 98%
rename from clang/lib/AST/Interp/Block.cpp
rename to clang/lib/AST/Interp/InterpBlock.cpp
index 5fc93eb39f4e..ed6e8910194d 100644
--- a/clang/lib/AST/Interp/Block.cpp
+++ b/clang/lib/AST/Interp/InterpBlock.cpp
@@ -10,7 +10,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "Block.h"
+#include "InterpBlock.h"
 #include "Pointer.h"
 
 using namespace clang;

diff  --git a/clang/lib/AST/Interp/Block.h b/clang/lib/AST/Interp/InterpBlock.h
similarity index 98%
rename from clang/lib/AST/Interp/Block.h
rename to clang/lib/AST/Interp/InterpBlock.h
index 97fb9a3ca096..0ccdef221c83 100644
--- a/clang/lib/AST/Interp/Block.h
+++ b/clang/lib/AST/Interp/InterpBlock.h
@@ -1,4 +1,4 @@
-//===--- Block.h - Allocated blocks for the interpreter ---------*- C++ -*-===//
+//===-- InterpBlock.h - Allocated blocks for the interpreter -*- C++ ----*-===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.

diff  --git a/clang/lib/AST/Interp/Pointer.cpp b/clang/lib/AST/Interp/Pointer.cpp
index 1a10723aaca5..ef2638e2a36b 100644
--- a/clang/lib/AST/Interp/Pointer.cpp
+++ b/clang/lib/AST/Interp/Pointer.cpp
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #include "Pointer.h"
-#include "Block.h"
 #include "Function.h"
+#include "InterpBlock.h"
 #include "PrimType.h"
 
 using namespace clang;

diff  --git a/clang/lib/AST/Interp/Pointer.h b/clang/lib/AST/Interp/Pointer.h
index b8fa98e24faa..f2f6e0e76018 100644
--- a/clang/lib/AST/Interp/Pointer.h
+++ b/clang/lib/AST/Interp/Pointer.h
@@ -13,12 +13,12 @@
 #ifndef LLVM_CLANG_AST_INTERP_POINTER_H
 #define LLVM_CLANG_AST_INTERP_POINTER_H
 
-#include "Block.h"
 #include "Descriptor.h"
+#include "InterpBlock.h"
+#include "clang/AST/ComparisonCategories.h"
 #include "clang/AST/Decl.h"
 #include "clang/AST/DeclCXX.h"
 #include "clang/AST/Expr.h"
-#include "clang/AST/ComparisonCategories.h"
 #include "llvm/ADT/PointerUnion.h"
 #include "llvm/Support/raw_ostream.h"
 

diff  --git a/llvm/utils/gn/secondary/clang/lib/AST/BUILD.gn b/llvm/utils/gn/secondary/clang/lib/AST/BUILD.gn
index 671583755902..eb635fa453d8 100644
--- a/llvm/utils/gn/secondary/clang/lib/AST/BUILD.gn
+++ b/llvm/utils/gn/secondary/clang/lib/AST/BUILD.gn
@@ -81,7 +81,6 @@ static_library("AST") {
     "ExternalASTSource.cpp",
     "FormatString.cpp",
     "InheritViz.cpp",
-    "Interp/Block.cpp",
     "Interp/ByteCodeEmitter.cpp",
     "Interp/ByteCodeExprGen.cpp",
     "Interp/ByteCodeGenError.cpp",
@@ -93,6 +92,7 @@ static_library("AST") {
     "Interp/Frame.cpp",
     "Interp/Function.cpp",
     "Interp/Interp.cpp",
+    "Interp/InterpBlock.cpp",
     "Interp/InterpFrame.cpp",
     "Interp/InterpStack.cpp",
     "Interp/InterpState.cpp",


        


More information about the cfe-commits mailing list