[llvm] 9277ce7 - [DebugInfo] Remove unnecessary <string> include dependency from DebugInfo headers. NFC.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 17 08:59:16 PDT 2021


Author: Simon Pilgrim
Date: 2021-07-17T16:56:06+01:00
New Revision: 9277ce79328cb607656a08097559ff22447f2e70

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

LOG: [DebugInfo] Remove unnecessary <string> include dependency from DebugInfo headers. NFC.

At most these use the StringRef/Twine wrappers and don't have any implicit uses of std::string.

Move the include down to any cpp implementation where std::string is actually used.

Added: 
    

Modified: 
    llvm/include/llvm/DebugInfo/CodeView/CodeViewError.h
    llvm/include/llvm/DebugInfo/GSYM/GsymCreator.h
    llvm/include/llvm/DebugInfo/GSYM/GsymReader.h
    llvm/include/llvm/DebugInfo/MSF/MSFError.h
    llvm/lib/DebugInfo/CodeView/CodeViewError.cpp
    llvm/lib/DebugInfo/MSF/MSFError.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/DebugInfo/CodeView/CodeViewError.h b/llvm/include/llvm/DebugInfo/CodeView/CodeViewError.h
index cda32633ce657..17eb06c242a95 100644
--- a/llvm/include/llvm/DebugInfo/CodeView/CodeViewError.h
+++ b/llvm/include/llvm/DebugInfo/CodeView/CodeViewError.h
@@ -11,8 +11,6 @@
 
 #include "llvm/Support/Error.h"
 
-#include <string>
-
 namespace llvm {
 namespace codeview {
 enum class cv_error_code {

diff  --git a/llvm/include/llvm/DebugInfo/GSYM/GsymCreator.h b/llvm/include/llvm/DebugInfo/GSYM/GsymCreator.h
index da49b4592ee8d..872ccd4a0b6ab 100644
--- a/llvm/include/llvm/DebugInfo/GSYM/GsymCreator.h
+++ b/llvm/include/llvm/DebugInfo/GSYM/GsymCreator.h
@@ -12,7 +12,6 @@
 #include <functional>
 #include <memory>
 #include <mutex>
-#include <string>
 #include <thread>
 
 #include "llvm/ADT/ArrayRef.h"

diff  --git a/llvm/include/llvm/DebugInfo/GSYM/GsymReader.h b/llvm/include/llvm/DebugInfo/GSYM/GsymReader.h
index 1865fe78260b5..4ad9990c372fb 100644
--- a/llvm/include/llvm/DebugInfo/GSYM/GsymReader.h
+++ b/llvm/include/llvm/DebugInfo/GSYM/GsymReader.h
@@ -9,7 +9,6 @@
 #ifndef LLVM_DEBUGINFO_GSYM_GSYMREADER_H
 #define LLVM_DEBUGINFO_GSYM_GSYMREADER_H
 
-
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/DebugInfo/GSYM/FileEntry.h"
 #include "llvm/DebugInfo/GSYM/FunctionInfo.h"
@@ -19,11 +18,9 @@
 #include "llvm/Support/DataExtractor.h"
 #include "llvm/Support/Endian.h"
 #include "llvm/Support/ErrorOr.h"
-
 #include <inttypes.h>
 #include <memory>
 #include <stdint.h>
-#include <string>
 #include <vector>
 
 namespace llvm {

diff  --git a/llvm/include/llvm/DebugInfo/MSF/MSFError.h b/llvm/include/llvm/DebugInfo/MSF/MSFError.h
index 67962fbd50285..0ef30f10bc686 100644
--- a/llvm/include/llvm/DebugInfo/MSF/MSFError.h
+++ b/llvm/include/llvm/DebugInfo/MSF/MSFError.h
@@ -11,8 +11,6 @@
 
 #include "llvm/Support/Error.h"
 
-#include <string>
-
 namespace llvm {
 namespace msf {
 enum class msf_error_code {

diff  --git a/llvm/lib/DebugInfo/CodeView/CodeViewError.cpp b/llvm/lib/DebugInfo/CodeView/CodeViewError.cpp
index 69390c708f599..d12f6c796e500 100644
--- a/llvm/lib/DebugInfo/CodeView/CodeViewError.cpp
+++ b/llvm/lib/DebugInfo/CodeView/CodeViewError.cpp
@@ -9,6 +9,7 @@
 #include "llvm/DebugInfo/CodeView/CodeViewError.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/ManagedStatic.h"
+#include <string>
 
 using namespace llvm;
 using namespace llvm::codeview;

diff  --git a/llvm/lib/DebugInfo/MSF/MSFError.cpp b/llvm/lib/DebugInfo/MSF/MSFError.cpp
index f068d3334955b..e42157e9d48e1 100644
--- a/llvm/lib/DebugInfo/MSF/MSFError.cpp
+++ b/llvm/lib/DebugInfo/MSF/MSFError.cpp
@@ -9,6 +9,7 @@
 #include "llvm/DebugInfo/MSF/MSFError.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/ManagedStatic.h"
+#include <string>
 
 using namespace llvm;
 using namespace llvm::msf;


        


More information about the llvm-commits mailing list