this massive patch introduces a simple new abstraction: it makes
"FileID" a concept that is now enforced by the compiler's type checker
instead of yet-another-random-unsigned floating around.

This is an important distinction from the "FileID" currently tracked by
SourceLocation.  *That* FileID may refer to the start of a file or to a
chunk within it.  The new FileID *only* refers to the file (and its 
#include stack and eventually #line data), it cannot refer to a chunk.

FileID is a completely opaque datatype to all clients, only SourceManager
is allowed to poke and prod it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62407 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/HTMLPrint.cpp b/Driver/HTMLPrint.cpp
index 0956c2b..b2bb29c 100644
--- a/Driver/HTMLPrint.cpp
+++ b/Driver/HTMLPrint.cpp
@@ -60,19 +60,19 @@
     return;
 
   // Format the file.
-  unsigned FileID = R.getSourceMgr().getMainFileID();
-  const FileEntry* Entry = R.getSourceMgr().getFileEntryForID(FileID);
+  FileID FID = R.getSourceMgr().getMainFileID();
+  const FileEntry* Entry = R.getSourceMgr().getFileEntryForID(FID);
   
-  html::AddLineNumbers(R, FileID);
-  html::AddHeaderFooterInternalBuiltinCSS(R, FileID, Entry->getName());
+  html::AddLineNumbers(R, FID);
+  html::AddHeaderFooterInternalBuiltinCSS(R, FID, Entry->getName());
 
   // If we have a preprocessor, relex the file and syntax highlight.
   // We might not have a preprocessor if we come from a deserialized AST file,
   // for example.
   
-  if (PP) html::SyntaxHighlight(R, FileID, *PP);
-  if (PPF) html::HighlightMacros(R, FileID, *PP);
-  html::EscapeText(R, FileID, false, true);
+  if (PP) html::SyntaxHighlight(R, FID, *PP);
+  if (PPF) html::HighlightMacros(R, FID, *PP);
+  html::EscapeText(R, FID, false, true);
   
   // Open the output.
   FILE *OutputFILE;
@@ -87,7 +87,7 @@
   }
   
   // Emit the HTML.
-  const RewriteBuffer &RewriteBuf = R.getEditBuffer(FileID);
+  const RewriteBuffer &RewriteBuf = R.getEditBuffer(FID);
   char *Buffer = (char*)malloc(RewriteBuf.size());
   std::copy(RewriteBuf.begin(), RewriteBuf.end(), Buffer);
   fwrite(Buffer, 1, RewriteBuf.size(), OutputFILE);