1518b6c98SMartin Storsjo //===-- ResourceScriptCppFilter.h ------------------------------*- C++ -*-===//
2518b6c98SMartin Storsjo //
3*2946cd70SChandler Carruth // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*2946cd70SChandler Carruth // See https://llvm.org/LICENSE.txt for license information.
5*2946cd70SChandler Carruth // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6518b6c98SMartin Storsjo //
7518b6c98SMartin Storsjo //===---------------------------------------------------------------------===//
8518b6c98SMartin Storsjo //
9518b6c98SMartin Storsjo // This filters the input to llvm-rc for preprocessor markers, removing
10518b6c98SMartin Storsjo // preprocessing directives that a preprocessor can output or leave behind.
11518b6c98SMartin Storsjo //
12518b6c98SMartin Storsjo // It also filters out any contribution from files named *.h or *.c, based
13518b6c98SMartin Storsjo // on preprocessor line markers. When preprocessing RC files, the included
14518b6c98SMartin Storsjo // headers can leave behind C declarations, that RC doesn't understand.
15518b6c98SMartin Storsjo // Rc.exe simply discards anything that comes from files named *.h or *.h.
16518b6c98SMartin Storsjo //
17518b6c98SMartin Storsjo // https://msdn.microsoft.com/en-us/library/windows/desktop/aa381033(v=vs.85).aspx
18518b6c98SMartin Storsjo //
19518b6c98SMartin Storsjo //===---------------------------------------------------------------------===//
20518b6c98SMartin Storsjo 
21518b6c98SMartin Storsjo #ifndef LLVM_TOOLS_LLVMRC_RESOURCESCRIPTCPPFILTER_H
22518b6c98SMartin Storsjo #define LLVM_TOOLS_LLVMRC_RESOURCESCRIPTCPPFILTER_H
23518b6c98SMartin Storsjo 
24518b6c98SMartin Storsjo #include "llvm/ADT/StringRef.h"
25518b6c98SMartin Storsjo 
26518b6c98SMartin Storsjo #include <string>
27518b6c98SMartin Storsjo 
28518b6c98SMartin Storsjo namespace llvm {
29518b6c98SMartin Storsjo 
30518b6c98SMartin Storsjo std::string filterCppOutput(StringRef Input);
31518b6c98SMartin Storsjo 
32518b6c98SMartin Storsjo } // namespace llvm
33518b6c98SMartin Storsjo 
34518b6c98SMartin Storsjo #endif
35