[cfe-commits] [PATCH] Support for pragma include_alias

Aaron Ballman aaron at aaronballman.com
Sun Feb 19 15:31:50 PST 2012


One of the MSVC pragmas is the ability to remap include filenames, as
described in MSDN:
http://msdn.microsoft.com/en-us/library/wbeh5h91.aspx

The long and short of it is: you can use this pragma to map the source
filename to a replacement filename (usually for supporting the old 8.3
filenames on FAT systems, but can be used arbitrarily).  For instance:

#pragma include_alias( "FoobarIsReallyLong.h", "FOOBAR~1.H" )
#include "FoobarIsReallyLong.h"  // Actually opens up FOOBAR~1.H

#pragma include_alias( <foo.h>, <bar.h> )
#include <foo.h>  // Actually includes <bar.h>
#include "foo.h"  // Still includes "foo.h"

This patch implements that pragma, and closes Bug 10705.

~Aaron
-------------- next part --------------
A non-text attachment was scrubbed...
Name: include_alias.patch
Type: application/octet-stream
Size: 9219 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120219/21c5ff74/attachment.obj>


More information about the cfe-commits mailing list