[Clang interpreter] Rename Block.{h,cpp} to InterpBlock.{h,cpp}
authorFangrui Song <maskray@google.com>
Thu, 20 Feb 2020 22:54:22 +0000 (14:54 -0800)
committerFangrui Song <maskray@google.com>
Fri, 21 Feb 2020 17:47:28 +0000 (09:47 -0800)
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

clang/lib/AST/CMakeLists.txt
clang/lib/AST/Interp/InterpBlock.cpp [moved from clang/lib/AST/Interp/Block.cpp with 98% similarity]
clang/lib/AST/Interp/InterpBlock.h [moved from clang/lib/AST/Interp/Block.h with 98% similarity]
clang/lib/AST/Interp/Pointer.cpp
clang/lib/AST/Interp/Pointer.h
llvm/utils/gn/secondary/clang/lib/AST/BUILD.gn

index a741ca5..da7b808 100644 (file)
@@ -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
similarity index 98%
rename from clang/lib/AST/Interp/Block.cpp
rename to clang/lib/AST/Interp/InterpBlock.cpp
index 5fc93eb..ed6e891 100644 (file)
@@ -10,7 +10,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "Block.h"
+#include "InterpBlock.h"
 #include "Pointer.h"
 
 using namespace clang;
similarity index 98%
rename from clang/lib/AST/Interp/Block.h
rename to clang/lib/AST/Interp/InterpBlock.h
index 97fb9a3..0ccdef2 100644 (file)
@@ -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.
index 1a10723..ef2638e 100644 (file)
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #include "Pointer.h"
-#include "Block.h"
 #include "Function.h"
+#include "InterpBlock.h"
 #include "PrimType.h"
 
 using namespace clang;
index b8fa98e..f2f6e0e 100644 (file)
 #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"
 
index 6715837..eb635fa 100644 (file)
@@ -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",