Roughly, you add parsing code to lib/Parse/ParsePragma.cpp, add an
action to include/clang/Parse/Action.h, add some representation in the
AST, add a handler to Sema to create the necessary AST node, and make
CodeGen handle the new AST node.
I'm not sure I quite follow what you're trying to do, though.