2
0
Эх сурвалжийг харах

Remove using namespace llvm from DxilSubobject.h (#1649)

Tex Riddell 6 жил өмнө
parent
commit
baba32dcb0

+ 3 - 5
include/dxc/DXIL/DxilSubobject.h

@@ -19,8 +19,6 @@
 #include "llvm/ADT/MapVector.h"
 #include "llvm/ADT/StringRef.h"
 
-using namespace llvm;
-
 namespace hlsl {
 
 class DxilSubobjects;
@@ -119,11 +117,11 @@ public:
   DxilSubobjects &operator=(const DxilSubobjects &other) = delete;
 
   // Add/find string in owned subobject strings, returning canonical ptr
-  llvm::StringRef GetSubobjectString(StringRef value);
+  llvm::StringRef GetSubobjectString(llvm::StringRef value);
   // Add/find raw bytes, returning canonical ptr
   const void *GetRawBytes(const void *ptr, size_t size);
-  DxilSubobject *FindSubobject(StringRef name);
-  void RemoveSubobject(StringRef name);
+  DxilSubobject *FindSubobject(llvm::StringRef name);
+  void RemoveSubobject(llvm::StringRef name);
   DxilSubobject &CloneSubobject(const DxilSubobject &Subobject, llvm::StringRef Name);
   const SubobjectStorage &GetSubobjects() const { return m_Subobjects;  }
 

+ 3 - 3
lib/DXIL/DxilSubobject.cpp

@@ -184,7 +184,7 @@ DxilSubobjects::DxilSubobjects(DxilSubobjects &&other)
 DxilSubobjects::~DxilSubobjects() {}
 
 
-StringRef DxilSubobjects::GetSubobjectString(StringRef value) {
+llvm::StringRef DxilSubobjects::GetSubobjectString(llvm::StringRef value) {
   auto it = m_StringStorage.find(value);
   if (it != m_StringStorage.end())
     return it->first;
@@ -213,14 +213,14 @@ const void *DxilSubobjects::GetRawBytes(const void *ptr, size_t size) {
   return ptr;
 }
 
-DxilSubobject *DxilSubobjects::FindSubobject(StringRef name) {
+DxilSubobject *DxilSubobjects::FindSubobject(llvm::StringRef name) {
   auto it = m_Subobjects.find(name);
   if (it != m_Subobjects.end())
     return it->second.get();
   return nullptr;
 }
 
-void DxilSubobjects::RemoveSubobject(StringRef name) {
+void DxilSubobjects::RemoveSubobject(llvm::StringRef name) {
   auto it = m_Subobjects.find(name);
   if (it != m_Subobjects.end())
     m_Subobjects.erase(it);