[cfe-commits] r173689 - Note that SrcMgr::SLocEntry's are POD-like, so SmallVector can do a

Douglas Gregor dgregor at apple.com
Mon Jan 28 07:39:10 PST 2013


Author: dgregor
Date: Mon Jan 28 09:39:10 2013
New Revision: 173689

URL: http://llvm.org/viewvc/llvm-project?rev=173689&view=rev
Log:
Note that SrcMgr::SLocEntry's are POD-like, so SmallVector can do a
better job with them. Shaves off 0.7% of -fparse-only time for a
modules test case. Sure makes you wonder...

Modified:
    cfe/trunk/include/clang/Basic/SourceManager.h

Modified: cfe/trunk/include/clang/Basic/SourceManager.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/SourceManager.h?rev=173689&r1=173688&r2=173689&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/SourceManager.h (original)
+++ cfe/trunk/include/clang/Basic/SourceManager.h Mon Jan 28 09:39:10 2013
@@ -1620,4 +1620,12 @@ public:
 
 }  // end namespace clang
 
+namespace llvm {
+  // SrcMgr::SLocEntry's are POD-like.
+  template<>
+  struct isPodLike<clang::SrcMgr::SLocEntry> {
+    static const bool value = true;
+  };
+}
+
 #endif





More information about the cfe-commits mailing list